SALT LAKE CITY — Brigham Young University remains one of the most hostile campuses in the country for gay and transgender students, according to an annual college ranking list.

But the private university does not top the list of LGBT-unfriendly schools. In fact, it came in sixth in a list of 10, mostly religious, schools. Grove City College (Grove City, Pa.) a Christian liberal arts school of 2,500 students. and Hampden-Sydney College, an all-male liberal arts college affiliated with the Presbyterian Church in Hampden Sydney Va., came in first and second.

The Church of Jesus Christ of Latter-day Saints teaches that same-sex attraction is not a sin, but that acting on it is.

The Princeton Review, which rates the academic and social traits of campuses nationwide, recently released a number of annual Top 20 lists. On the other end of the spectrum, Emerson College in Boston was named the most accommodating to lesbian, gay, bisexual and transgender people.

This year’s BYU ranking is especially noteworthy. During the 2015 legislative session, Utah lawmakers, gay-rights advocates and Mormon leaders hammered out an anti-discrimination law that extends housing and employment protections to LGBT people while also safeguarding some religious liberties.

The legislation, which makes it illegal to discriminate against gay and transgender people in some instances, was hailed as a momentous compromise. But it does not apply to every entity in the state. BYU is exempt.

Students at BYU do not have to be Mormons, but they must have an endorsement from a faith leader and also sign the school’s Honor Code.

In response to a request for comment on the ranking, BYU spokeswoman Carri Jenkins pointed to a statement on the school’s website.

“A student’s stated same-gender attraction does not preclude them from attending BYU,” the statement reads. “The university welcomes as full members of the university community all whose behavior meets university standards.”

The contract also forbids alcohol and premarital sex, so it’s little surprise the campus of about 30,000 also ranked No. 1 on the list of “stone-cold sober” schools.

For the 2015 rankings, Princeton Review staff members surveyed about 136,000 students at 380 schools.

The survey includes 80 questions, with subject matter ranging from coursework to attitudes of fellow students.

Here are the top 10 most LGBT unfriendly schools, according to the Princeton Review:

1. Grove City College, Grove City, Penn.

2. Hampden-Sydney College, Hampden-Sydney, Va.

3. College of the Ozarks, Point Lookout, Mo.

4. Wheaton College, Wheaton, Ill.

5. University of Tennessee in Knoxville

6. Brigham Young University, Provo, Utah

7. Gordon College, Wenham, Mass.

8. Calvin College, Grand Rapids, Mich.

9. Hillsdale College, Hillsdale, Mich.

10. Baylor University, Waco, Texas

Copyright: For copyright information, please check with the distributor of this item, Religion News Service LLC.