Forty-seven years after they fell illicitly in love in a devout Mormon community in Utah, and eight years after they fled to Maryland from Virginia as it curtailed gay rights, Tibby Middleton and Barbara Kenny strolled down the wedding aisle Saturday, leading the audience in song.

“Don’t be afraid of some change,” they sang, waving their arms. “Today will be a joyful day; enter, rejoice, and come in.”

More than 150 friends and family members sang along to the popular hymn at the Unitarian Universalist Congregation of Frederick, which became a haven for the couple, both of whom are now in their mid-70s, after they moved to the western Maryland city following nearly two decades of a happy and prosperous life in Fredericksburg.

Their lives there ended after Virginia passed a law prohibiting gay couples from enjoying the same benefits as straight couples, making contracts such as medical directives tricky or impossible to enforce. “We took a stand,” Middleton said in her living room a couple of weeks before the wedding. “We had to.”

The brides wore jeans. Guests brought food for a potluck. When the Rev. Carl Gregg opened the ceremony by saying “today is not about starting their life together,” but “about them taking their place as a lawful married couple,” tears streamed from the first row to the last. Afterward, one woman said it was the first time she had seen her husband cry in 32 years of marriage.

Barbara and Tibby. Tibby and Barbara. Their love story captivated not just their friends and family, but also the region following a documentary and 2005 Post Magazine story. “They used their move for a greater purpose than themselves,” said Meg Menke, a close friend of the couple’s from the church. “They are remarkable women.”

Kenny fell for Middleton the moment she saw her walk down the stairs to her art studio in Salt Lake City in the mid-1960s. Kenny was a tough, quiet, brooding character who often had cigarette packs rolled up in her sleeves. Middleton had married a man after high school but knew she was gay. And she was struggling.

“When she came down those stairs I thought she was the most beautiful person I had ever seen,” Kenny said. “And that was it.”

Their courtship began with long walks. Long talks. And then Middleton did the unthinkable in her devoutly Mormon community: She asked for a separation from her husband. Kenny and Middleton became a couple. They moved in with each other. Middleton brought her two young children. Middleton confided to a psychiatrist, who outed them to the Mormon church. Then they became pariahs.

They fled east, settling in Virginia. Middleton’s daughter Holly stayed behind with her father in Utah, but her son James came along. The women kept separate bedrooms. They tried to keep their lives quiet. They worked hard — Kenny as a clinical social worker and painter, Middleton as a popular teacher. They built a life together. They owned property. They made good friends and were welcomed into the Unitarian Universalist church.

But Virginia’s 2004 law, the Affirmation of Marriage Act, was “a slap in the face,” Middleton said. Kenny had been diagnosed with a brain aneurysm — a wrong diagnosis, it turned out later — deepening their worries over what rights they’d have together in Virginia if something went wrong. They picked up and left.

They settled on Maryland. For one, it wasn’t far away. They knew the state leaned liberal. And moving to Frederick put them close to Middleton’s daughter, who had eventually joined the couple in Virginia and later moved to Germantown with her young daughter.

Did they think about getting married? They had. But they didn’t want to get married in a state they didn’t live in — Massachusetts, for instance, where it was legal and where they vacationed every summer. At their age, they had also missed most of the financial benefits. And although Maryland was a liberal state, they never expected a referendum to pass permitting gay marriage.

And then, last year, it did.

But still: Marriage? In their 70s?

“What would we be gaining?” Middleton said.

Everything changed in December when Kenny had knee surgery. She was laid up in bed. Middleton stayed at her bedside. She recalls staring at Kenny, who was groggy on pain medicine. “It was just so touching to me,” Middleton said, turning to Kenny in their living room. “I remember thinking to myself, ‘I love you. I’m just in love with you.’ And then I began thinking, ‘I want to marry you.’ ”

While Middleton is outgoing and talkative, Kenny is more reserved. She has a wickedly dry sense of humor. She might also be described, at times, as a tad grumpy. Middleton knew Kenny would never ask her. “But I thought, ‘Wait a second, I can ask her.’ ”

In April, they went to Provincetown, at the end of Cape Cod. One sunny afternoon Middleton told Kenny she wanted to stop by a park near the ocean. She was carrying a manila envelope. Kenny worried that Middleton was about to break up with her.

But the envelope held a list of memories that Kenny had written down a few months back about their lives together. They sat down on a bench. Middleton took her lover’s hand. She read some of the memories. “Look at this,” she told Kenny. “This is a life. Forty-seven years. We have built this life together.” And then she said, “Will you marry me?”

Kenny: “Yes, yes, yes.”

A wedding, they decided, is ultimately a celebration and a declaration.

“It is a public declaration of our love for each other,” Kenny said.

Asked to describe that love, what one has gotten from the other over 47 years, Kenny said, “Everything.” Middleton said: “There is just this soul connection. It’s a bottom line. She can be ready to slam me against the wall, but she loves me. She loves me. And no matter what happens, I simply love her. I love her.”

They sat in the first row at their wedding and watched Middleton’s 13-year-old granddaughter Madison sing an old Irish love song they cherish, “Believe Me, if All Those Endearing Young Charms.” They watched Middleton’s children deliver funny and touching remarks about the couple’s history. James remembered being 17 and his mother sitting him down for a talk.

“You know I’m gay, right?” Middleton said.

Her son replied: “Of course. I live with you. It’s cool.”

They laughed. They hugged.

“I saw the relief in her eyes,” James said. “It was an important moment. That’s the first time she said to me out loud, to her own son, that she was gay and loved Barbara. And it just made us closer. Time, perseverance, love had changed the world within our house. The outside world would require a little bit more work.”

For the couple, the work ended at the pulpit as they faced each other to exchange reflections on their lives. Kenny told Middleton: “I know that you love me and I love you. . . . The touch of your hand is all I ever need. . . . I know that I want to be married with you. You are forever, everything.” Middleton told Kenny: “We have struggled together and with the world, and we have triumphed.”

When the reverend said, “Tibby and Barbara are married,” loud cheering erupted. The couple kissed. And they hugged. And then they strolled through the cheers, clapping and waving their way down the aisle until they got outside the sanctuary, where they were met almost immediately by Middleton’s granddaughter.

She hugged them both. Tears rushed down her face. She is growing up in a different world than they had.

Michelle Boorstein contributed to this report.