Marc Bennetts is a Moscow-based journalist and author of “I’m Going to Ruin Their Lives: Inside Putin’s War on Russia’s Opposition” (Oneworld, 2016).

MOSCOW — Boris Yeltsin had a reputation for the sensational and the unpredictable, from ordering tanks to shell a rebellious Russian parliament to drunkenly hunting for pizza in Washington in his underwear. But he saved arguably his biggest surprise for last.

Twenty years ago this New Year’s Eve, with six months to go until the end of his final term, an ailing Yeltsin addressed Russia in a special noontime broadcast. “I am leaving. I have done all I could,” he said, his words slurred by ill health and alcohol abuse. “A new generation is coming. They can do more, and better.”

Later that night, as the Kremlin clock ticked down the final minutes of the 1990s, a dour-faced representative of that “new generation” appeared before the nation as Russia’s acting president.

“Like you, I intended this evening to listen to the New Year greetings of President Boris Yeltsin,” said Vladimir Putin, the former state security service chief who had been named prime minister just four months earlier. “But things turned out otherwise.”

Life under Boris Yeltsin had been a mixture of the surreal and the grotesque.

I was in Britain that dramatic New Year’s Eve, but I’d been living in Russia since 1997, catching the tail end of Yeltsin’s chaotic presidency. There were of course no Twitter storms or YouTube videos of the handover of power. Instead, I found out about Yeltsin’s decision to anoint Putin as Russia’s new leader hours after it had happened, via Ceefax, a now-defunct teletext information service.

I flew back to Moscow later that week: If someone had possessed a crystal ball, I’m not sure what I would have been more surprised to discover — that I would still be living in the Russian capital two decades on, or that Putin would still be in the Kremlin.

* * *

Life under Yeltsin had been a mixture of the surreal and the grotesque. The Communist ideology that had dominated life for seven decades had been tossed onto history’s garbage dump, leaving Russians to adapt to a strange new beast called capitalism.

It was a task many were simply not up to: Suicides rose, life savings were lost in wild pyramid schemes, and crime rocketed. State employees often went unpaid for months. In August 1998, Russia defaulted on its foreign debt, triggering economic collapse.

Soviet propaganda had depicted life in the West as unrelenting misery for all but the very richest, and the 1990s seemed to prove the communists were right. “Everything our leaders told us about communism was false. But it turns out that everything they told us about capitalism was true,” went the (bitter) Russian joke.

Putin knew what his fellow citizens craved. “Russians have had no sense of stability for the past 10 years," he told state television ahead of March 2000 presidential elections. “We hope to return this feeling.”

Over the next eight years, aided by rocketing prices for oil — Russia’s main export — Putin set about doing just that. By May 2008, toward the end of his second term in office, salaries were not only being paid on time, but they were higher than ever. The streets of major cities began to fill with advertisements for easy loans, and people long accustomed to frugality suddenly found they could afford foreign holidays, new cars and plasma-screen TVs.

Although political freedoms were being curtailed, independent media strangled, and money that should have been used to build up vital infrastructure simply siphoned out of the country, many Russians stayed silent. After all, it seemed churlish to complain about such things when you could spend two weeks a year at a Turkish Black Sea resort and then come back to your new home entertainment center.

"Putin inherited a ransacked and bewildered country, with a poor and demoralized people” — Alexander Solzhenitsyn, Soviet dissident writer

“People agreed on a pact with the devil,” said Oleg Orlov, the head of Memorial, Russia’s oldest human rights organization. "They said, 'We will stay out of the social and political process and concentrate on our private lives — just don’t touch us and leave us a small slice of the profits from your oil booty.'”

It was, as Russian intellectuals like to say, a case of “sausages in exchange for freedom.”

Sausages won out.

“What good is freedom of speech if my fridge is empty?” an elderly woman asked me in the central city of Voronezh in 2007. I wasn’t sure what to reply, so I mumbled something about how, in an ideal world, she would have both. My answer failed to convince her. "Both?" she said. “Who is going to give me both?”

* * *

It was toward the end of his second term that the sale of Putin memorabilia went overboard — shops were suddenly full of clocks, mugs and even wall rugs bearing his image. “Who buys a Putin wall rug?" I asked a woman at a market stall near Moscow. “Usually office workers, for their bosses,” she said.

Putin received praise from unlikely quarters. “Putin inherited a ransacked and bewildered country, with a poor and demoralized people,” said Alexander Solzhenitsyn, the Soviet dissident writer. “And he started to do what was possible — a slow and gradual restoration. These efforts were not noticed, nor appreciated, immediately.”

Solzhenitsyn was not the only fan.

“I want a man like Putin, full of strength / I want a man like Putin, who doesn’t drink / I want a man like Putin, who won’t offend me / I want a man like Putin, who won’t run away,” went the lyrics to an infectious hit by a female pop duo. It was just the first of a number of pop and rap songs to eulogize the Kremlin strongman.

It became increasingly hard to escape Putinmania. On a trip to Tobolsk, in western Siberia, I met Minsalim, a wild-haired shaman who made a living by carving ornaments from mammoth tusks. The centerpiece of his collection was a tiny sculpture of Russia’s steely-eyed leader. “Putin saved Russia — like a Siberian hero of old,” Minsalim said.

In 2008, Russia’s military defeated neighboring Georgia in a five-day war over the breakaway republic of South Ossetia. “Putin’s Plan for Russia is Victory!” read the propaganda posters in the months before fighting broke out, and for many Russians the military triumph in the South Caucasus was proof that the “national leader” was a man who kept his promises. His approval ratings soared to over 80 percent.

* * *

Putin’s hold over Russian politics throughout the 2000s was absolute. But as his second term of office hit the midway point, he had to make perhaps the most important decision of his presidency. The Russian constitution stated clearly that no president could serve more than two “consecutive” terms. But Putin had no plans to surrender power.

In May 2008, Putin shifted to the post of prime minister while Dmitry Medvedev, his former election campaign manager, became president. For a short time, Medvedev, who portrayed himself as a reformer, was championed by Russia’s liberals, who were encouraged by his memorable, if clumsy, slogan: “Freedom is better than non-freedom.” In 2010, Medvedev enjoyed approval ratings that rivaled Putin’s.

As part of Medvedev’s much-heralded program of “modernization,” the Kremlin oversaw the reinvention of RIA Novosti, a state news agency, as a modern, censorship-free media outlet. In 2011, I became its first full-time English-language correspondent. This was no Kremlin propaganda outfit — RIA Novosti had total editorial independence and I spent my days interviewing opposition figures and listening to allegations of high-level corruption.

Yet despite Medvedev’s tentative reforms, no one was any under illusions as to who was pulling the most important strings. As Medvedev’s sole term drew to an end, he admitted that he would like to seek reelection, but the decision wasn’t entirely up to him. The Kremlin ruled out the obvious democratic solution — a presidential election contested by both Medvedev and Putin. “Medvedev would have lost, but Putin was scared that he would get a large share of the vote,” said Gleb Pavlovksy, a former Kremlin adviser.

Instead, Putin made a return to the presidency in May 2012 for a third term. Once safely reinstalled in the Kremlin, Putin set about rolling back Medvedev’s meager reforms. In 2013, RIA Novosti was dismantled and the agency’s boss, Svetlana Mironyuk, dismissed.

Putin replaced her with Dmitry Kiselyov, a notorious television presenter known for his anti-Western tirades. I’d already quit the agency, but Kiselyov told the RIA journalists who remained that “objectivity” was a myth. “Our country needs [our] love,” he said.

It was a wake-up call for those Russians who had bought into Medvedev’s promises of reform. But things were about to get much darker.

* * *

The Kremlin’s seizure of Crimea from Ukraine in March 2014 triggered an outbreak of aggressive nationalism. Putin, in a keynote speech, accused opposition politicians of being “national traitors,” a term that his critics noted had once been used by Adolf Hitler.

Suddenly, everyone in Russia wanted to talk politics. It became increasingly difficult to avoid getting sucked into heated discussions about the “fascist junta” in Ukraine — as Russian state media had taken to calling the new pro-Western government in Kyiv.

Later that year, I witnessed a mother scream at her adult daughter that she was “betraying her homeland” because she praised investigations by Alexei Navalny, the opposition politician, into alleged corruption by members of Putin’s inner circle.

"There is no Russia today if there is no Putin" — Vyacheslav Volodin, speaker of the Russian parliament

This atmosphere of unbridled nationalism was encapsulated perfectly by the Night Wolves, a motorcycle gang that received around €1 million in state funds to promote anti-Western ideas and “traditional” Russian values.

The leather-clad gang staged concerts for children that portrayed the West as intent on destroying Russia. Alexander Zaldostanov, the Night Wolves' heavily-tattooed leader, told me that the concerts had to be “really frightening” to convince children of the seriousness of the threat. The same year, Russian state television aired a 15-minute program extolling the virtues of life in North Korea.

Amid the stand-off over Ukraine, Putin was transformed into the living, breathing embodiment of Russia. As Vyacheslav Volodin, the speaker of the Russian parliament, put it: "There is no Russia today if there is no Putin."

* * *

The anniversary of Putin’s second decade in power has been accompanied by a tangible cooling of Russia’s passion for the ex-KGB officer who has already outlasted three U.S. presidents and been accused of helping put a fourth into the White House.

In May, Putin’s trust ratings fell to a 13-year low of just 31 percent as discontent simmered over an increase to the pension age, widespread poverty and relentless allegations of corruption against the political elite. Putin came to power promising stability, but his foes are increasingly drawing comparisons with Yeltsin’s “wild” 1990s.

In my trips across Russia, far fewer people seem willing to praise Putin and his policies. Instead, anger and disappointment are much more common.

“They conned us for a while with Crimea,” Konstantin, an unemployed man in Russia’s far north, told me last year. “But now he’s revealed his true colors with the pension reforms.”

This year has also seen a dramatic uptick in protests over issues ranging from election fraud to toxic garbage dumps. The authorities are apparently so nervous that in September they deployed around a dozen armed officers to arrest a Siberian shaman who had vowed to magically expel Putin from office.

State-sponsored commemorations of the anniversary of Putin’s ascent to the presidency have been low-key. Indeed, state media has barely mentioned that it is now 20 years since Yeltsin handed over the keys to the Kremlin.

Konstantin Gaaze, a political analyst with the Carnegie Moscow Center, suggested the silence is because Putin is uncomfortable of memories of exactly how he became president. “On 31st December 1999, Putin was just a product of Yeltsin’s will. And he wants to forget about this,” Gaaze said. He also said the Kremlin might be wary about reminding Russians of exactly how long Putin has been in power, especially if he intends to prolong his rule beyond May 2024, when his final term of office is due to expire.

Speculation has already begun that Putin is seeking to engineer a way to remain in power. Heading a Union State with neighboring Belarus could be one option, as could another stint as prime minister.

It’s unlikely, of course, that Putin will manage another 20 years as Russia’s leader. And even if he does, it’s highly improbable that I will still be in Moscow to report on it.

Only a fool, however, would completely rule out either scenario.