It is extremely rare for former Presidents to admit mistakes made in office, and rarer still for one to disavow a major piece of legislation. That’s partly why Bill Clinton’s op-ed in the Washington Post calling the 1996 Defense of Marriage Act—a law that he signed—“incompatible with our Constitution,” and asking the Supreme Court to overturn it, is so important.

The essay, a Clinton associate told me, was Clinton’s own idea; he wrote it out himself in longhand on a legal pad. As his former White House adviser on gay-rights, I was not surprised by the message. But Clinton’s willingness, just twenty days before two gay-rights cases go to the Supreme Court, to publicly call DOMA discriminatory is a big step, even if his comments stopped short of the full apology some have asked for.

But the op-ed leaves a political mystery intact. Clinton, though clearly unhappy with the law today, does not really explain why he signed it, other than to say “it was a very different time.” Perhaps that is explanation enough. Still, how was it that Bill Clinton, the first President to champion gay rights, put his name on one of the most discriminatory anti-gay statutes in American history?

The simple answer is that he got boxed in by his political opponents, and that his campaign positions on gay rights ran ahead of public opinion. But there was another important factor: a failure to imagine how quickly gay rights would evolve, and how difficult it would be to undo the damage that DOMA did.

When Bill Clinton first ran for President over twenty years ago, he was the first candidate for national office to seek and receive support from an organized gay political community, which was itself new to Presidential politics. In 1992, after twelve years of Republican control of the White House, the federal government had neglected funding the battle against the quickly burgeoning AIDS epidemic. Clinton was sympathetic; because of his interest in civil rights generally, and long friendships with gay and AIDS activists, he was then one of the national politicians most conversant on gay-equality issues.

During that campaign, in May of 1992, as governor of Arkansas, Clinton spoke at the first large-scale Presidential campaign event for gay and lesbian supporters, in West Hollywood, California. He gave an emotional speech largely focussed on the AIDS crisis, in which he spoke of the moral costs to the country of ignoring those suffering from the disease. Gay men with AIDS had been dying at a stunningly rapid rate. Their families, friends, and caretakers had, in many cases, shunned them, and so had national leaders. In contrast, Clinton said, “I want to give you my thanks for that struggle…,” and concluded, “I have a vision and you’re a part of it. I believe we’re all a part of the same community and we’d better start behaving as if we are.”

Clinton won the enthusiastic support of gays and lesbians in the 1992 election. For the first time, contributions from gay Americans factored significantly in campaign fundraising. Gays and lesbians finally had a President who included them rhetorically in the national policy debate.

But soon after Clinton took office, in 1993, it was apparent that his tenure was off to a rocky beginning. The early days of the Administration were marred by opposition within the military and the Democratic Party itself to Clinton’s idea of gays and lesbians serving openly in the uniformed armed forces. The White House was unprepared to shepherd a major social-policy change through Congress. The Senate Armed Services Committee chairman, Sam Nunn, a Democrat from Georgia, led opposition to Clinton’s gay-rights policy, working behind the scenes with General Colin Powell, who was a Bush-holdover as Chairman of the Joint Chiefs of Staff. The so-called Don’t Ask Don’t Tell compromise was born: gays and lesbians would be allowed to serve so long as they kept their sexual orientation secret. Gay-rights advocates were outraged that Clinton had agreed to a bad compromise, but at this point, in the spring of 1993, it was clear that the President was going to lose this battle. (Don’t Ask Don’t Tell, in fact, turned out to be a policy and personnel disaster.)

After what was regarded as a fiasco on gays in the military, the Administration entered a phase of deep reluctance to tackle substantive gay-rights issues on the national stage. Although Clinton made a number of first-ever, high-profile appointments of gay leaders to his team (I was one of the minor ones), any kind of gay-rights policy agenda seemed stalled as a result of the Don’t Ask Don’t Tell hangover.

As Republicans prepared for the 1996 Presidential election, they came up with what they thought was an extremely clever strategy. A gay-rights lawsuit in Hawaii was gaining press coverage as an initial series of preliminary court rulings suggested that gay marriage might be legally conceivable there. Clinton was on the record opposing marriage equality. But Republicans in Congress believed that he would still veto legislation banning federal recognition of otherwise valid same-sex marriages, giving them a campaign issue: the defense of marriage.

What Republicans had not counted on, though, was just how adverse the Administration had become, especially in an election year, to getting ahead of public opinion on gay rights after having had to backtrack on open military service.

On May 23, 1996, as DOMA began its rapid journey through Congress, the New York Times reported:

George Stephanopoulos, a senior Presidential adviser who has overseen the issue, said: “It’s wrong for people to use this issue to demonize gays and lesbians and it’s pretty clear that that was the intent in trying to create a buzz on this issue. But the fact remains that if the legislation is in accord with the President’s stated position, he would have no choice but to sign it.

That was a bit of a bombshell, but it laid an intentional marker. The columnist Frank Rich, then writing for the Times, wrote that, “The bill also forces Mr. Clinton, who says he opposes both same-sex marriage and anti-gay discrimination, into a corner…. He’s presumably praying it will never reach his desk.”

Inside the White House, there was a genuine belief that if the President vetoed the Defense of Marriage Act, his reëlection could be in jeopardy. There was a heated debate about whether this was a realistic assessment, but it became clear that the President’s chief political advisers were not willing to take any chances. Some in the White House pointed out that DOMA, once enacted, would have no immediate practical effect on anyone—there were no state-sanctioned same-sex marriages then for the federal government to ignore. I remember a Presidential adviser saying that he was not about to risk a second term on a veto, however noble, that wouldn’t change a single thing nor make a single person’s life better.