Corbin Aoyagi, a supporters of gay marriage, waves his flag during a rally at the Utah State Capitol, Tuesday, Jan. 28, 2014, in Salt Lake City. Opponents and supporters of gay marriage held twin rallies at the Capitol on Tuesday. More than 1,000 gay couples rushed to get married when a federal judge overturned Utah's constitutional amendment banning same-sex marriage in late December 2013. In early January the U.S. Supreme Court granted Utah's request for an emergency halt to the weddings. (AP Photo/Rick Bowmer)

On a cold Saturday last month, hundreds of couples swirled around a 6-foot-high cake at a mass wedding reception at a Salt Lake City concert hall, celebrating the recent court ruling that had unexpectedly allowed them to marry their partners. A pair of gray-haired women in tuxedo vests held each other close, laughing at a private joke. A smooth-faced man pressed his cheek against his partner's three-day scruff. A Beyoncé cover of the classic Etta James song summed up the mood: "At last."

Sally Farrar didn't join in. She and her partner of 27 years, and wife of 19 days, Brenda, stood off to the side, like wallflowers at the junior prom. "I'm so uncomfortable right now," Sally said, a frown on her face and a bottle of water in her hand. "I'm freaking out."

Mormons have never been big partiers. The religion bans the one substance that most American adults consider essential to a good time, and even though Sally ended her formal relationship with the Church of Jesus Christ of Latter-day Saints nearly 30 years ago, around the time she began a romantic relationship with Brenda, she still won't touch a drop, even at parties. In many ways, she remains loyal to the conservative Mormon values that shaped her childhood and still dominate the culture and politics of the city where she lives.

She votes for Republicans. She works as a title attorney and gives a chunk of her income to charities, though not to the church. She and Brenda have raised a pair of straight, clean-cut, all-American kids -- a high-school baseball star, Ben, 18, and a biochemistry major, Maddie, 21. And until this January night, neither Sally nor most of her friends in Salt Lake City's small community of Mormon and formerly Mormon gays and lesbians had ever been to a gay pride event, or a gay party of any kind.

Now, at 48, she found herself at a precarious juncture, staring ahead at the unknown territory of the gay-rights movement while trying to stay close to the familiar guideposts of her Mormon past.

"I'm so uncomfortable," Sally repeated to her friends, eyeing a portly man with strings of tiny white Christmas lights encircling the pair of pointy cones protruding from the chest of his gown.

"Oh come on," said Deb Wells, a 50-year-old former Mormon and lesbian who works as a massage therapist. "Big fucking deal."

"You don't feel uncomfortable at all?" Sally asked, pressing the point.

"Hell no!" Deb said, shaking her hips to the rhythms of Michael Bublé.

The drag queen's electric boobs sparkled back into view. "See there?" said Sally. "Right there? That's weird."

Outsiders often say the same about Mormons, but members of the LDS church don't see themselves that way. One of the central symbols of their faith is a beehive -- an image of harmony, or conformity, depending on your point of view. They dress modestly, in pleated khakis or knee-length skirts, but not to the conspicuous degree of the Amish or the Hasidim. Since they renounced polygamy more than a century ago, they've been intent on weaving themselves into the fabric of mainstream American culture.

With that culture growing more accepting of gays in recent years, the Mormon church has softened its rhetoric against homosexuality. Yet the church leadership in Salt Lake City remains firmly opposed to same-sex marriage, limiting access to its 141 sacrosanct temples worldwide to straight couples who have been married by the church and lesbian and gay individuals who choose a life of celibacy.

So Sally was as surprised as anyone when Judge Robert Shelby of the U.S. District Court for Utah, a registered Republican, struck down the state's ban on same-sex marriage on Dec. 20, thrusting Utah to the volatile forefront of the gay-rights movement. With Mormons making up more than 60 percent of its population, Utah is the second-most religious state in the nation after the Baptist stronghold of Mississippi, according to a 2013 Gallup poll.

Sally and Brenda seized the moment, exchanging vows at the county clerk's office in Salt Lake after standing outside in the early-morning cold for hours with dozens of other couples. If they'd waited a few more weeks, they would have missed their chance. On Jan. 6, the U.S. Supreme Court granted the state's request to stop marrying same-sex couples for the immediate future, as the case makes its way through the appeals courts. By the time the mass wedding reception took place nearly a week later, the window for same-sex marriages had closed. Couples at the party were not only toasting their recent commitments but also raising funds for a looming court battle to keep their marriage rights.

Sally grew up hearing about the feats of her spiritual forebears, the Mormon families that wandered west in the early 19th Century looking for religious freedom in the face of persecution. Until Shelby's decision, however, she'd never imagined she'd make her own public stand for freedom and acceptance. It was a role that would take some getting used to.

* * * * *

"After last night, I don't fit in anywhere," Sally said the morning after the January party. "I'm not angry at the church, but I don't fit in there, and I didn't fit in last night."

She sat in a faded armchair in her living room, one leg stretched out on an ottoman, the other curled beneath her. Brenda, a lapsed Catholic from a Mexican-American family, sat on the couch, drinking coffee. The two made a contrasting pair. Where Brenda is tall and striking and has a bit of sarcastic edge, Sally has a round, soft face and a warm demeanor. Speaking in the honeyed tones of her native Georgia, Sally recounted her reaction to the sight of a lesbian party guest wearing a man's button-down shirt and a boyish haircut. "I'm like, 'Oh, that's a woman?"

"I'm not going to hate on lesbians," Brenda replied. "I don't care what they look like."

"I know that it's wrong of me to judge people," Sally consented.

Brenda had to smile at this. "I feel pretty comfortable with people being different," she said. "You kind of have a hard time with that."

It's a difficulty many Mormons seem to face. As Lawrence Wright wrote in a 2002 New Yorker article exploring the religion's troubled legacy, "The paradox of Mormonism is that a faith with such an embattled history has fostered a community whose members are ostensibly so conventional."

Sally, far left, and Brenda, far right, with their children, Benjamin and Maddie, and Maddie's husband, Bryce, center, in San Francisco this December.

The recent developments on marriage have thrown this paradox into sharp relief. In the words of Patrick Q. Mason, the head of Mormon Studies at Claremont Graduate University, in California, the church's stance against same-sex marriage reflects "a widespread historical amnesia about Mormons' own alternative marriage practices."

The history of the Church of Latter-day Saints is a story of marginalization and persecution, one driven in large part by its founder's unorthodox views on marriage. In the 1820s, Joseph Smith, the son of a farmer living in western New York, said he had unearthed and translated a book of solid gold pages that had been buried in a nearby hillside for 1,400 years. The published work, the Book of Mormon, intrigued some people and provoked anger and skepticism in others. "There was an appealing simplicity to the book's central message, which framed existence as an unambiguous struggle between good and evil," wrote Jon Krakauer in Under the Banner of Heaven, a book that intertwines Smith's story with an account of a 1984 double-murder committed in the name of God by two Mormon fundamentalist brothers.

Smith was a charismatic leader and a brilliant storyteller. He was also widely considered a charlatan, and as he and his followers searched for a place to establish a communal Mormon utopia, outsiders threatened them with mob violence and sometimes attacked. The strife grew more intense after Smith said God had revealed to him that practicing polygamy would help men get into heaven, and that those who rejected plural marriage risked damnation. In 1844, an angry mob in Carthage, Ill., broke into a jail where Smith was awaiting trial on treason charges and shot him several times. He fell out the window and died shortly after hitting the ground.

Smith was succeeded in the church by Brigham Young, a carpenter and blacksmith with a beard shaped like the spade of a shovel. Young led his followers over the Rocky Mountains, where he founded the state of Utah and built two neighboring mansions to accommodate his enormous family. He is said to have married some 55 women, earning the epithet "most married man in America."

In 1878, a year after Young's death, the U.S. Supreme Court delivered a blow to these unconventional unions, rejecting the argument that "religious duty" justified the violation of federal laws prohibiting the practice of polygamy. By then, the U.S. Army had invaded Utah in part to end Young's theocratic rule, and the people had elected a non-Mormon governor. In 1890, Congress voted to disincorporate the LDS church and seize its assets. That same year, the church's president announced he had received a revelation from God disavowing plural marriages.

It's unknown exactly how many Mormons from fundamentalist sects continue to practice polygamy -- estimates range from 10,000 to 50,000 in the United States. But the vast majority of America's more than 6 million Mormons have never had anything to do with it. In giving up polygamy, Mormons made a "deliberate and distinct decision to join the nation," said Mason, the Mormon historian. And while members of the LDS church had their own political party in the 19th century, "today, they are comfortably situated in the GOP," he said. It was a Mormon former governor of Massachusetts, after all, who won the backing of the Republican establishment to run for president in 2012.

Since that pivotal moment in the late 19th century, Mormonism has been largely defined by a sense of pragmatism, an ambition to survive and expand above all else. Some say this desire for broad acceptance influenced the church's decision, at the height of the culture wars in the mid-1990s, to join with other conservative groups in publicly condemning same-sex marriage. "THE FAMILY is ordained of God. Marriage between man and woman is essential to His eternal plan," the church declared in a 1995 document, "The Family: A Proclamation To The World." "We warn that the disintegration of the family will bring upon individuals, communities, and nations the calamities foretold by ancient and modern prophets."

The church's single largest contribution to the fight against same-sex marriage came in 2008, when members shelled out a combined $20 million and dozens boarded buses bound for California in an effort to generate support for Proposition 8, the state's ban on same-sex marriage. Observers on both sides of the issue say this Mormon campaign was largely responsible for tipping the scales and securing Prop 8's victory at the polls.

But if the church entered that fight looking to make friends among mainstream Americans, it made a critical mistake in failing to anticipate how much their attitudes on same-sex marriage would shift over the next few years. The first signs of a backlash against the church's stance appeared almost immediately, when thousands of protesters shut down Temple Square in Salt Lake City in early November 2008. A few months later, the actor Tom Hanks, then serving as an executive producer of "Big Love," an HBO drama about a family of fundamentalist Mormons in Utah that practices polygamy, blasted the church's support for Prop 8 as "un-American" at a premiere party for the show. (Hanks later apologized without backing down from his basic premise: "No one should use 'un- American' lightly or in haste. I did," he said.)

In August 2010, CNN released a poll showing for the first time that a narrow majority of Americans supported same-sex marriage. President Barack Obama announced his "evolution" on the issue two years later. And then came June 26, 2013, when the Supreme Court both overturned Prop 8 on technical grounds and ruled that Section 3 of the Defense of Marriage Act, the 1996 law barring the federal government from recognizing same-sex marriages, was unconstitutional.

In his dissent, Justice Antonin Scalia predicted that the court's DOMA decision would lead to judges striking down same-sex marriage bans in states throughout the country. Judge Shelby, in his December ruling on Utah's ban, said he agreed with Scalia's interpretation that such a move was "inevitable."

The official Mormon response was tepid. "The Church has been consistent in its support of traditional marriage while teaching that all people should be treated with respect," it said in a statement after Shelby's decision.

Mason thinks LDS leadership may have realized that their strong stand against same-sex marriage back in 2008 hurt the church's image, and interfered with a primary mission of attracting new members to spread the gospel. "The culture is changing," he said, "and the church sees itself as part of the culture."

* * * * *

Through all these changes and revelations, one thing has remained steady in the Mormon faith: the belief that the family unit is sacred and eternal. All Judeo-Christian religions espouse the importance of family, but Mormonism takes the idea of family togetherness to another level. The main role of the Mormon temple is to perform ceremonies that bind families together for eternity, ensuring that they'll enter the celestial kingdom as one.

To some families, this may sound like a nightmare. Sally's family made it sound like a Club Med vacation. "My mom's joke was, 'I'm going to find the best beach house I can in Heaven, and get all the land I can around it so you all can come and live with me,'" Sally recalled. Unfortunately, Sally's same-sex relationship means that she and Brenda won't be spreading out a beach blanket on her family's celestial plot -- gay couples aren't allowed into Mormon Heaven. In a departure from the church's previous condemnation of homosexuality as evil, LDS leadership did put out a pamphlet in 2007 claiming that gay people could go to Heaven so long as they remained celibate -- for which they would be rewarded in the afterlife with a heterosexual relationship. Sally and Brenda had already been enjoying the benefits of a non-celibate relationship for more than two decades.

Sally wasn't born a Mormon. She grew up in Georgia, and her parents joined a Mormon church when she was 3 years old, repudiating their Presbyterian and Methodist backgrounds and setting themselves apart from the Southern Baptists and evangelicals who lived on their street. Sally's classmates in grade school would ask whether she had horns or multiple moms. So she already knew what it felt like to be an outsider when at age 17 her mother, fed up with Sally's habit of kissing other girls, handed her a trash bag filled with clothes and told her to leave.

The annals of gay history are filled with stories of teens in similar situations striking out for San Francisco or Greenwich Village. Sally made her way to Salt Lake City, to the heart of Mormondom, determined to start therapy and find a husband.

Instead, on the night of her 21st birthday she found herself in a gay bar, staring at a "breathtaking" brunette in a blue checkered shirt -- the same woman she would marry in ski clothes on a freezing Utah morning nearly 30 years later. "We started talking and just fell in love," Sally recalled.

When her parents found out about Brenda, they were devastated. Her dad ordered her to choose between Brenda and the family; her oldest sister told her she was going to hell. Over time, an uneasy truce was forged. Sally and Brenda joined in annual family trips to Disney World and the beach. After Sally's siblings made their way to Utah in recent years, they began to meet each week for Sunday dinners. But the two women never held hands or kissed in front of the family.

Sixteen years ago, Sally's mother got sick with cancer, and the couple decided to move back to Georgia. They tried to rejoin the family's church, so that Maddie and Ben could experience the same close-knit community Sally had known as a child. But the bishop told Sally that she and Brenda would never be able to become full members of the community, enter the temple, or teach a Sunday school class. "And that's what we wanted to always avoid," Sally said. "We didn't want our children to be in place of worship where they didn't feel equal to or less than." A few years after Sally's mother died in 2007, the Farrars moved back to Utah, where they settled in a heavily Mormon community in the hills overlooking Salt Lake City, a few blocks from her sisters and brother.

Sally and Brenda got married the night before Christmas Eve. The next night, a chilly mood crept into their home, spreading through the convivial gathering of Sally's siblings, their spouses and their many children. On the television, a newscaster had interrupted the evening's planned coverage to announce that Judge Shelby had denied the state's request to put a halt to same-sex marriages while it filed an appeal of his earlier ruling.

The evening had already been tense. At dinner, no one had congratulated the newlyweds, and no one had mentioned the court case that had drawn reporters from the national media to their state. Only now, with the newscaster forcing the issue into the living room, did Sally's sister Susan speak her mind. "She snapped," Sally recounted a few days later. "She said, 'That is just wrong. The people should decide what happens in their state.' And I turned to her and I just exploded."

Sally had never seen herself as a fighter for gay rights, but something changed in her in the weeks after the initial ruling and her wedding, she said. "My heart is heavy, and I am tired," she wrote in a blog post for Marriage Equality USA, a gay-rights advocacy group. "I can no longer remain silent on this issue."

Especially provoking to Sally was Utah's decision to defend the marriage ban by arguing that heterosexual couples are better at raising children than gay parents. "I need the world to see that our family, these kids, we're no goddamned different from anyone else," she said. She'd long ago stopped obeying the Mormon prohibition against blasphemy.

* * * * *

Sally's friends include a handful of lesbians with Mormon backgrounds, and nearly all of them share her desire to be seen as normal. "I get up early, I eat my breakfast, I love my spouse," said one woman in her 50s at a brunch at Sally's house the morning of the big wedding reception, ticking the items off on her fingers.

Another woman said she still felt deeply tied to Mormon culture, even though the church had excommunicated her for being gay some 20 years ago. "You can take the girl out of the church, but you can't take the church out of the girl," she said.

Sally and others hope the church will come to see same-sex commitments as no less deserving of praise and pride than heterosexual marriages. And they can already point to signs that Mormon institutions are inching in that direction. Over the past several years, the church has backed state and local anti-discrimination measures protecting gay people. Early last year, it acknowledged on a church website that gay people "do not choose to have such attractions" -- a step away from its previous position that gay people could change their sexuality through prayer and therapy.

Perhaps the most striking sign arrived last month, when the church announced it would not be filing a friend of the court brief in the unfolding legal battle over same-sex marriage in Utah, as it did last winter in a pair of briefs supporting Proposition 8 and and the Defense of Marriage Act.

What the church has yet to signal, however, is any intention of discarding its basic theological view that same-sex marriage is wrong. Just because the church sits out the fight in Utah doesn't mean that it will open the doors of its temples to gay couples. For that to happen, under LDS doctrine, the president of the church would have to receive a revelation from God, not unlike the one that led to the renunciation of polygamy more than a century ago.

Opposing sides of Utah's marriage fight have already begun to file their own briefs to the appeals court. The state's team is lead by Gene Schaerr, a Mormon lawyer. In an email to colleagues that was later leaked to the legal blog Above The Law, Schaerr explained that he took the position in order to "fulfill what I have come to see as a religious and family duty." Depending on what the appeals court decides, the Supreme Court could end up hearing the case by the end of this year.

Activists for marriage equality and religious liberty alike believe the coming months will provide a critical "moment of opportunity" for promulgating their views, as Paul Mero, president of the conservative Salt Lake City-based advocacy group The Sutherland Institute, put it. Sitting in his office by Temple Square, Mormonism's gray, granite answer to the Vatican, he said the institute planned to run TV ads and to sponsor lectures and debates. "Win or lose in court," he said, "you still have to capture the hearts and minds of the people."

A painting by the Mormon artist Minerva Bernetta Kohlhepp Teichert hung on the wall, depicting a traditional pioneer family -- man, woman, child -- steering their iconic handcart down into the valley. From his seat beneath the painting, Mero favorably compared the plural marriages that were common in those days to the same-sex relationships he hears of today. "The women were not married to each other," he pointed out. Polygamous marriages were "natural," he insisted, "and that doesn't exist with a same-sex relationship. In terms of public policy, for me, you have a loving committed friendship. That's what you have. You don't have a marriage."

Three weeks after her Christmas Eve explosion, Sally decided to give the ritual of the family dinner another go. This time, there weren't any cold words or tears. There was chicken parm. After the plates were cleared, the family sprawled around the living room, the kids watching the Golden Globes and texting furiously. Sally sat on an easy chair by the TV, listening quietly as her sisters and their husbands took turns airing their complicated feelings about same-sex marriage.

Although they spoke of Brenda as their sister-in-law, they weren't ready to reject Mormon doctrine. "We believe that marriage between a man and a woman is central to God's plan, because obviously it brings children and we believe that's central," said Susan, 45.

Still, she added vaguely, "There are so many things out here that get confused and messed up, and I know that His plan and purpose is just and fair. He judges people's hearts, and we don't know each other's hearts."

Earlier that day, Sally had recalled a trip to Temple Square when she was 16, after her parents first discovered her kissing the homecoming queen. The visit went better than expected. A church psychiatrist took Sally into his office and showed her two filing cabinets on either side of his desk. One contained the records of gay Mormons who had gone on to marry opposite-sex partners; the other was an archive of those whom he considered lost causes.

"'Your heavenly father loves both drawers just the same,'" she remembered the psychiatrist telling her. "'The brethren are not quite with me on this, but there will be a day when that will change.'"