John Speer rested a rainbow flag - the same one Mayor Nutter ordered Friday to fly at City Hall - on one shoulder. Speer, 72, came out in 1976. Before that, he sneaked into gay bars.

"I really didn't think I'd live to see this day," said Speer, one of hundreds who convened on Independence Mall to celebrate a Supreme Court decision declaring same-sex marriage a constitutional right.

Nutter, less than an hour after his flight from Italy landed in Philadelphia, read from the Declaration of Independence. He said the city would continue to strive for equality.

"Let us enjoy the happiness of the moment," he said. "But none of us can be free until we're all free. None of us can have rights until we all have rights."

Although both supporters and opponents had expected this change to come within days, it didn't lessen the magnitude of Friday's ruling - or the emotional response.

"It's a gigantic lesson in what marriage means and what love means, what dignity means, what respect means," said Mark Aronchick, a Philadelphia lawyer who led the Whitewood v. Corbett case that overturned Pennsylvania's gay-marriage ban in 2014.

Gov. Wolf, a Democrat, praised the ruling - " `Gay marriage' is now simply marriage" - while Gov. Christie, a Republican, grudgingly agreed to comply. "I don't agree with the way it was done," he said. "But it's been done, and those of us who take an oath have a responsibility to abide by that oath."

For opponents, this was the latest in an avalanche of rulings overturning state bans and dismantling a time-honored tradition rooted in religion, family, and morals.

"The Supreme Court's 5-4 decision on marriage is not a surprise," said Philadelphia Archbishop Charles J. Chaput. "The surprise will come as ordinary people begin to experience, firsthand and painfully, the impact of today's action on everything they thought they knew about marriage, family life, our laws, and our social institutions."

For supporters, the date of the ruling was meaningful - exactly two years after the Supreme Court struck down the federal Defense of Marriage Act, and 12 years after the court overturned antisodomy laws.

This year also marks the 50th anniversary of a gay-rights march in front of Independence Hall that many now consider the start of a national LGBT civil rights movement.

Malcolm Lazin, executive director of the Equality Forum, said thousands are expected to celebrate that anniversary - and, now, the ruling - in Philadelphia on July Fourth. James Obergefell, lead plaintiff in the case that brought Friday's Supreme Court ruling, is set to speak.

Legal experts said the ruling would become a landmark on a par with Roe v. Wade or Brown v. Board of Education.

"With the stroke of a pen, the Supreme Court altered the fabric of the United States in a way it hasn't been altered, candidly, since the founding of the republic," said Terry Mutchler, former state open-records chief and now a lawyer with Pepper Hamilton.

Pennsylvania Attorney General Kathleen G. Kane, who in 2013 refused to defend the state's same-sex marriage ban, said the ruling "is a victory not only for same-sex couples, their families and children, but affirms the rights of all citizens for equal treatment under the law."

Advocates said, however, much remains to be done. In Pennsylvania, "you can get married at 10 in the morning, and at 3 in the afternoon you can be fired from your job, evicted from your home," said Mutchler, who wrote a book about the death of her partner in the 1990s, when their relationship was not recognized.

Democrat Jim Kenney and Republican Melissa Murray Bailey, the nominees for Philadelphia mayor, each praised the ruling Friday and called for a statewide antidiscrimination ordinance.

Such a bill has been floating around Harrisburg for years, but State Rep. Daryl Metcalfe (R., Butler) said he still was not inclined to release it from committee.

"The Supreme Court decided to make a ruling based on the shift of some public sentiment rather than what's in the Constitution and what natural law dictates," he said. "It doesn't mean the rest of us are going to change our opinions and give up the moral fight to preserve marriage between one man and one woman."

Religious organizations and some business groups are also gearing up for battles over religious liberty and freedom of speech, fearing they will be accused of discrimination if they refuse to officiate at or cater a gay wedding.

"Unfortunately, our justices chose to redefine marriage for the entire nation, ignoring other constitutional rights and opening the door to a dangerous infringement on religious liberties," said Sam Roh rer, president of the Pennsylvania Pastors Network.

On Market Street, cars honked at those gathered on Independence Mall. "Congratulations," a tour guide yelled from the top of a passing double-decker bus.

Rue Landau, executive director of the Philadelphia Commission on Human Relations, pointed to her wife and son. "It's significant," she said, "for a 7-year-old boy to know his parents have the exact same union as all of his other classmates' parents."

610-313-8117 @JS_Parks

Inquirer staff writer Ben Finley contributed to this article.