Hundreds of people gather outside the US Supreme Court building in Washington, D.C. on June 26, 2013 in anticipation of the ruling on California's Proposition 8. (Mladen Antonov/AFP/Getty Images)

Until recently, the Church of Jesus Chris of Latter-day Saints has been associated with the opposition to gay rights. The Mormon Church campaigned to pass Proposition 8, California's same-sex marriage ban, and two years ago a church elder called same-sex attraction “impure and unnatural.” But Monday's Senate vote -- in which three Mormons played a key role in helping clear the way for passage of a bill banning workplace discrimination on the basis of sexual orientation or gender identity -- shows how much has changed in the past five years.

Senate Majority Leader Harry Reid (D-Nev.) pressed for the first floor vote in more than 17 years on the Employment Non-Discrimination Act; Sen. Orrin Hatch (R-Utah) provided political momentum for the measure by voting for it in committee in July; and Sen. Dean Heller (R-Nev.) put the effort over the top by announcing he would be the 60th vote to break a filibuster that conservatives were waging against the bill.

Other Mormon senators split on the issue: Tom Udall (D-N.M.) voted to proceed with the bill, while GOP Sens. Mike Crapo (Idaho), Jeff Flake (Ariz.) and Mike Lee (Utah) voted against it.

"Several key Mormon senators showed tremendous leadership on ENDA, providing decisive votes for basic fairness," said the Human Rights Campaign's Fred Sainz. "If you want evidence of the quickly changing sands on equality issues, this is a good example of it. The research on nondiscrimination protections couldn’t be clearer: rank-and-file worshipers support these protections because of their faith, not in spite of it. "

"The Church hasn’t taken a position on this legislation" its spokesman Eric Hawkins wrote in an e-mail.

The Mormon Church has changed its approach to gay-rights issues in recent years, though its stance depends on the issue. It continues to object to the active practice of homosexual activity, saying in an official Web site on gay issues: "The experience of same-sex attraction is a complex reality for many people. The attraction itself is not a sin, but acting on it is."

In February, the Church filed briefs on both gay-marriage cases pending before the Supreme Court, saying its support for Proposition 8 was not based on bigotry: “On the contrary, our members supported Proposition 8 based on sincere beliefs in the value of traditional marriage for children, families, society, and our republican form of government. Only a demeaning view of religion and religious believers could dismiss our advocacy of Proposition 8 as ignorance, prejudice, or animus.”

But the Church backed a Salt Lake City ordinance banning employment discrimination based on sexual orientation and gender identity -- 15 municipalities in Utah now have such protections for gay and transgender residents -- and is engaged in discussions with a Utah lawmaker this year on whether to support a statewide ban on workplace and housing discrimination against gays. Ultimately, the Mormon Church did not endorse the legislative proposal.