Kansas Gov. Sam Brownback signed legislation Tuesday allowing faith-based groups at college campuses to restrict membership to like-minded people, likely putting the state on a collision course with civil liberties groups.

The Republican-dominated Legislature approved the legislation earlier this month, even though the U.S. Supreme Court ruled nearly six years ago that universities can require membership in such groups to be open to all. Supporters have said the bill was a victory for the freedom to exercise religious beliefs, but opponents called it a veiled attempt to legalize discrimination.

Kansas already has a religious objections law that prevents state or local governments from limiting people's freedom to express their religion, though that law doesn't touch on organizations at universities. With the conservative Republican governor's signature, Kansas becomes the second state after Oklahoma to have a college-specific law.

"This is very narrowly targeted," Brownback said after signing the new law, which will take effect in July.

The legislation stemmed from a handful of on-campus incidents in Kansas and other states, including a lawsuit filed by a Christian group after Washburn University said the group couldn't require that student members recognize the Bible, not the Book of Mormon, as the word of God. The issue emerged after a Mormon student was forbidden from leading the group's Bible study.

The student, Daniel Arkell, now a 41-year-old attorney in Dodge City, told The Associated Press last week that he still believes student associations should have the right to stand for something and the right to practice their own beliefs - but that "when public funds come into play, there needs to be a little bit more leeway."

Opponents of the new law said it would sanction discrimination in the name of religion, could risk the loss of federal grant money, and would waste money defending it in court. The American Civil Liberties Union of Kansas has said it assessing whether it would file a lawsuit challenging the Kansas measure.

The U.S. Supreme Court ruling originated from a California incident. The Christian Legal Society at the University of California-Hastings College of Law was refused recognition and funding after it required all members to sign a form that they would abstain from pre-marital or same-sex sexual conduct. In a 5-4 decision, the high court backed the university's right to do so.

The Kansas debate follows an uproar last year over a religious objections law in Indiana, and to a lesser extent a similar measure in Arkansas. Critics in those cases said the laws would allow discrimination against gays and lesbians by allowing providers of services such as flowers to deny them for same sex weddings. Both states revised their laws following the criticism, although they still allow certain religious objections.

This year, the Missouri Senate passed a proposal to include religious protection in the state constitution for those who object to gay marriage. The measure is pending.