Across the country, people shared photos and videos through social media to express their reactions to the Supreme Court's ruling that bans on same-sex marriage are unconstitutional. (The Washington Post)

Some cheered. Some wept with joy. Some got news of the U.S. Supreme Court’s landmark decision from Twitter or Facebook and responded that way, too, passing along to friends and relatives in real time the news that the justices upheld the right to gay marriage.

For older gay Americans, the decision was perhaps more poignant than for others. Now in the twilight of their lives, they had experienced the worst days, some of them not long ago, when being gay was a dirty secret, and in some places tantamount to being criminal.

“Thirty years ago, people were hiding. People were harassed. There was no place to go. If you were gay, you could get fired,” said Imani Woody, 63, who started a project to transform her childhood home in the District into communal housing for older people who are lesbian, gay, bisexual or transgender. “I grew up Pentecostal, and you would go to Hell even if you were divorced, let alone if you were in a same-sex marriage.”

Alan Dinsmore, 72, of Alexandria, said the ruling was a dramatic turnabout for a society that had forced people like him into the shadows. “I look at this and I say, ‘Unbelievable.’ It’s just amazing what’s happened has happened in a few years,” he said.

The Supreme Court ruled, 5 to 4, that same-sex marriage bans are unconstitutional. Here's what you need to know. (Gillian Brockell/The Washington Post)

Dinsmore, a retired employee of the American Foundation for the Blind, said he grew up feeling that he had to hide an important part of himself. As a young man, Dinsmore dated girls. But he also knew that he was not really attracted to women and never married. He knew cruising areas around Miami, where he grew up, but he also knew he risked being hassled by police or even arrested were he to venture there.

“Living an entire life that’s based on pretend really cuts people off. I just basically had to disguise everything,” Dinsmore said. “The lack of an authentic life is really a darkening experience.”

As word of the decision in Obergefell v. Hodges swept from the Supreme Court, there was particular resonance among older LGBT people in the District, which has the highest percentage of gay adults relative to any state, according to UCLA Law School’s Williams Institute.

“There’s just incredible joy. This has been a long, long fight,” said Deacon Maccubbin, 72, who attended his first gay rights demonstration in 1969 and founded the Lambda Rising gay book store in 1974. The Dupont Circle store, which closed about five years ago, was one of the largest of its kind, and one of its main focuses was making people feel comfortable enough to emerge from the closet, he said. “If you had told me back in ’69 that we would have marriage in my lifetime, I would have scoffed.”

When the Supreme Court announced its ruling Friday, Maccubbin clicked between cable news channels, disappointed only that his husband, Jim Bennett, 59, couldn’t be with him to celebrate because he had left earlier Friday morning on a business trip. “We had to celebrate on the phone,” Maccubbin said.

Maccubbin said he and his husband married 34 years ago in a church service filled with friends but lacking the force of law. Friday’s high court decision, he said, meant that the marriage certificate they received in the District this year would be honored everywhere and that there would be no need to worry that one of them might be ejected from a hospital because he was not recognized as immediate family.

“Even though there’s more work to be done, I no longer feel like a second-class citizen in my own country,” he said.

Michael Sabatino, 65, a City Council member in Yonkers, N.Y., who has battled for same-sex marriage recognition for 17 years, said the ruling is of particular importance to older gay people.

“It just makes us much more secure as we age,” Sabatino said. “I also think it will help aging institutions recognize us as a married couple, so we don’t have to worry about being separated in nursing homes or facilities like that if it happens.”

Sabatino, whose marriage was referenced in Godfrey v. Spano, a 2006 case that went to New York’s highest court, said he marveled at the change that he has seen on this issue in his lifetime.

“When we first started in this movement, even the established gay groups said we were crazy, [that] this would never happen,” Sabatino said. “It was really about educating the public.”

Sabatino said popular media also played a huge role in winning acceptance for gay people and same-sex marriage.

“The younger generation — this is not an issue for them. They don’t see what the big deal is,” Sabatino said. “I think because of television and mainstreaming gay families and gay situations, I think they have friends who might be gay who come out earlier. I didn’t come out until I was 28. I think they’re just much more accepting.”

Woody, the founder of the communal LGBT home, was in a meeting about the project, Mary’s House, when someone texted her about the 5-to-4 decision acknowledging a constitutional right to marriage for people who are homosexual.

Woody interrupted the meeting to pass on the news. “Happy day!” people said and asked for the link to pass on.

At the same time, amid her jubilation, she also told herself that gay people must remain vigilant.

“The Supreme Court has ruled this is the end, but I think of Roe v. Wade,” Woody said, adding that many states have enacted laws to restrict or attempt to roll back the right to abortion. “[N]ow we’re doing that fight again.”

Like several others, Woody said she felt a great debt to those who came before her and revealed their true selves when it was even harder to find acceptance, painfully paving the way to Friday’s decision. That includes gay and lesbian Americans who did not, like Woody, live to see this day.

The Supreme Court ruling was the result, Woody said, of “more people willing to come out and say, ‘This what we are and who we are.’ And their allies said, ‘That’s fine. It’s who you are.’ This is what makes us America.”