A year of difficult negotiations finally wrapped up on the night of June 17, 1991. For weeks, Soviet President Mikhail Gorbachev had rarely been seen in public, because he was so occupied with hammering out an agreement on a new treaty that would fundamentally redefine the U.S.S.R. Significant amounts of power would devolve to the republics — Russia, Ukraine and the rest — and they in turn would freely join in creating a new union.

That was the idea, anyway.

Five years of reform had left the Soviet Union economically strapped. But Gorbachev’s efforts to unleash the press — which he called glasnost, or openness — had brought a much bigger surprise. Non-Russian nationalism, suppressed since Stalin’s day, erupted all over the country. Gorbachev had wanted to make the Soviet system more modern and efficient, and instead he had Lithuanians demanding their freedom. And Estonians and Moldovans and Georgians and on and on. Even Ukrainians were joining in.

So to keep the Soviet Union from breaking apart, Gorbachev had reversed an earlier decision and called on the republics to join in a new pact that would give them greater latitude, replacing the original, and decidedly non-voluntary, union treaty of 1922.

At the center of this plan was a great big problem. If this was to be a truly voluntary association of republics, what about those republics that freely chose not to join in? By June 17 it was clear that only nine of the U.S.S.R.’s 15 republics were planning to stick around.

Gorbachev pushed ahead anyway. He believed this was the only way to save the U.S.S.R., which incidentally would be renamed the Union of Soviet Sovereign Republics. Hardliners in Moscow — and there were plenty of them — were aghast at the idea of dropping the word Socialist from the name of their country.

And there was something else they were getting angry about. Boris Yeltsin had just been confirmed as the winner of Russia’s first presidential election. If most of the important powers were going to be handed over to the republics, this would make Yeltsin — now leader of the biggest and most significant republic — potentially the most prominent leader in the country. Yeltsin the apostate, Yeltsin the renegade, Yeltsin the infidel: He was a former member of the Politburo who had been drummed out of the party and then had the nerve to come back and campaign against his former Communist comrades. And beat them!

Yeltsin was promising far-reaching market-oriented reforms. His opponents were apoplectic.

Hours after signing on to the new treaty, Yeltsin left for a visit to the United States. The administration of President George H.W. Bush was trying to figure out how it could show its continuing support for Gorbachev, whose reforms it saw as the best way forward for the Soviet Union and for stable relations between Moscow and Washington, while not giving Yeltsin the cold shoulder. After all, Yeltsin had won an election — something Gorbachev had never done. Maybe, officials mused, a warm welcome for Yeltsin would put pressure on the conservatives in Moscow to back Gorbachev as their only alternative.

It was a bank-shot approach to foreign policy. It turned out in the end to be pretty much beside the point.

For Gorbachev and his supporters, the next step after securing the late-night agreement on the treaty was to get it ratified by the legislatures of the various republics. Big demonstrations broke out several days later in Kiev, the capital of what was then known as the Ukrainian Soviet Socialist Republic, against any attempt to prolong the Soviet Union. But eventually enough republics had decided to join in that Gorbachev set a date for its official signing: Aug. 20, 1991.

It never happened. He spent that day under house arrest at his vacation home by the Black Sea.