To see the future of gay marriage, you didn’t have to set foot in the Supreme Court chamber Tuesday morning as the justices took up the first of two landmark caseson the issue.

You needed only to stand in the plaza in front of the court and gaze upon the sea of rainbow flags and the signs demanding marriage equality. A thousand or more demonstrators were in this festival, chanting and cheering the gay-rights speakers — crowding out the few dozen opponents of gay marriage who stood, sullen and surrounded, on the other side of First Street NE.

Only nine states and the District of Columbia allow gay marriage, and the majority of Americans favoring gay marriage is a narrow one, but there can be no mistaking which side has the energy. The most the Supreme Court can do is slow the inevitable march toward an idea whose time has come.

Inside the courthouse, Justice Antonin Scalia led a rearguard action among his conservative colleagues, who attempted to establish that traditional marriage is distinct because of its procreative potential — a quaint notion in this era of adoption and artificial fertility.

Justice Elena Kagan quizzed Charles Cooper, the lawyer defending California’s Proposition 8, which bans same-sex marriage, about his contention that homosexual marriage is inconsistent with “society’s interest in responsible procreation.”

“Suppose,” she said, “a state said that, because we think that the focus of marriage really should be on procreation, we are not going to give marriage licenses anymore to any couple where both people are over the age of 55.”

Cooper said that was different because, in the case of old folks, “it is very rare that both parties to the couple are infertile.”

The audience broke into laughter at Cooper’s apparent misunderstanding of the birds and the bees.

“I can just assure you,” Kagan advised the lawyer, “if both the woman and the man are over the age of 55, there are not a lot of children coming out of that marriage.”

Scalia jumped in with a joke to rescue Cooper from his struggle with the facts of life. “Strom Thurmond was not the chairman of the Senate committee when Justice Kagan was confirmed,” he said.

It was not immediately clear what the deceased senator’s late-life fecundity had to do with gay marriage.

Scalia’s plight seemed all the more anachronistic because the man arguing for gay marriage was Ted Olson, the former solicitor general for George W. Bush’s administration. Most of the time, Olson got the best of his ideological comrades.

Ann Telnaes animation: Republicans rethink gay marriage. (Ann Telnaes/The Washington Post)

“When did it become unconstitutional to exclude homosexual couples from marriage?” Scalia asked Olson.

“When did it become unconstitutional to prohibit interracial marriages?” Olson retorted.

Chief Justice John Roberts tried a subtler argument against Olson’s claim that the California ban discriminates by creating a separate-but-equal status for gay marriage.

“Same-sex couples have every other right — it’s just about the label,” Roberts challenged.

Replied Olson: “It is like you were to say, you can vote, you can travel, but you may not be a citizen.”

In the case the justices are hearing Wednesday, it is widely expected that they’ll strike down the discriminatory Defense of Marriage Act, which allows states to ignore other states’ same-sex unions. In Tuesday’s case, justices appeared to be looking for a narrow way to rule — something that would apply to Proposition 8 and nothing else.

But nothing the justices do will stop the legalization of gay marriage; even Cooper acknowledged that public opinion “is changing, and changing rapidly, in this country.” The question is whether the court forces gay-marriage activists to win the right state by state.

That will be up to the court’s swing vote on such matters, Justice Anthony Kennedy, who seemed to be struggling with his decision. He said that the circuit-court ruling striking down the California ban is “a very odd rationale.” He also said that he wasn’t even sure the high court should be hearing the case because there isn’t enough “sociological information” on gay marriage and because there are doubts about whether supporters of the ban had standing to bring the case.

“On the other hand, there is an immediate legal injury,” he said, “and that’s the voice of these children. There are some 40,000 children in California . . . that live with same-sex parents, and they want their parents to have full recognition and full status. The voice of those children is important in this case.”

If that’s where the swing vote is, the people rallying on First Street NE won’t have long to wait.

In my March 24 column, I wrote that the heckler who interrupted President Obama’s speech in Israel was protesting for the release of Jonathan Pollard, a spy for Israel. This was based on news reports at the time. Later media reports said the heckler was complaining about Israeli treatment of Palestinians.

Read more from Dana Milbank’s archive, follow him on Twitter or subscribe to his updates on Facebook.