The Supreme Court on Monday upheld a state law school’s anti-discrimination policy that requires recognized student groups to admit “all comers” as members, over the objection of a religious group that did not want to allow nonadherents to join.

The Christian Legal Society chapter at the University of California Hastings College of the Law argued that the policy violated its First Amendment rights to free expression, free exercise of religion and freedom of association by requiring it to allow members who do not share their religious beliefs.