As the weeks rolled by after the failed coup against Mikhail Gorbachev, the reality of the Soviet Union’s fast-flowing ebb tide had become unmistakable. In the first week of October 1991, the U.S.S.R. agreed to withdraw the 45,000 troops then stationed in Poland, its onetime satellite, within 14 months. That led Lithuania’s president, Vytautas Landsbergis, to insist on Oct. 10 that Soviet troops leave his country, too — and get out of his capital, Vilnius, by Dec. 1 of that same year.

Lithuania had been genuinely independent for all of seven weeks at that point. About 100,000 Soviet soldiers were stationed there. “Can one rely on maintaining friendly relations with a state that practices such a brutal approach?” Landsbergis asked.

A music professor, Landsbergis had led his Baltic country through the 18 difficult months following its initial declaration of independence from Soviet rule. He had become a hero to many in the West. Now Lithuania’s independence had been recognized — even by Moscow. The same was true for neighboring Estonia and Latvia.

But there was a huge problem. There was nowhere to put all those troops and their families. Housing for soldiers was already abysmal and inadequate, and the great pullback threatened to make things a lot worse.

So the Soviets stalled, and then the Russians stalled some more after they inherited the Soviet remains. In the end, those troops didn’t leave Lithuania until 1993 — by which time Landsbergis was just another politician from a small European country — and they stayed on in Estonia and Latvia for another year beyond that.

The delay didn’t please the people in those Baltic nations, but as it turned out the soldiers never got up to much mischief. The last two troops’ trains pulled away from a weedy siding in Riga, Latvia, on Aug. 31, 1994. It was a low-key moment.

A battered old Russian automobile was fastened down onto a flatcar. A boxcar was filled with piles of wood, a chipped safe with a broken lock, six worn ping-pong paddles and a makeshift punching bag.

A soldier kissed his weeping girlfriend goodbye. Another wondered whether they’d be bivouacked in an empty field once they got to Russia.

When Latvian President Guntis Ulmanis was officially informed that the last of the troops had gone, he said, “We all took a deep breath. Now Latvia can say the occupation days are over. We are finally masters of our own fate.”

In 2004, the three Baltic nations joined NATO.

As for the Russian military, after two wars in Chechnya and one in Georgia it’s in better shape today than it was 20 years ago, though not exceedingly so. Prime Minister Vladimir Putin has been methodically reducing the bloated officer corps and now wants to spend $600 billion over the next nine years on a thorough modernization of his country’s defense establishment.