This article is adapted from "Kremlin Rising: Vladimir Putin's Russia and the End of Revolution," published today by Scribner.

On a cold afternoon in the winter of 2004, Vladimir Putin summoned his long-serving prime minister to his Kremlin office.

"Unfortunately," Putin told him, "I have to fire you."

Mikhail Kasyanov was stunned. The Russian president gave no reason for the abrupt dismissal. Facing a national vote on his reelection just two weeks away, Putin had chosen a surprising time to shift governments. As he absorbed the news, Kasyanov assumed he would have to leave after the election. No, Putin corrected the prime minister. "I mean now."

The power of paranoia had gripped the Kremlin. For four years, the men around Putin had done everything possible to guarantee that no one could challenge his authority. The government had taken over national television, emasculated the power of the country's governors, converted parliament into a rubber stamp, jailed the main financier of the political opposition and intimidated the most potent would-be challengers from entering the race.

The Kremlin had proved so successful in eliminating competition that Putin's token competitors were now plotting to drop out en masse to protest the manipulation. And Putin's aides feared such a move could result in turnout on election day falling below the legal minimum. If that happened, the prime minister would become president for a month before a new election, putting him potentially in a position to do to Putin what Putin had done to his rivals -- a remote prospect but still untenable for a leader who believed no detail of democracy was too small to be managed. "In his mentality," one senior Putin aide said later, "every risk should be minimized to zero."

The risk posed by Kasyanov no longer seemed acceptable four years into Putin's rule. By now, the fledgling democracy of the post-Soviet era had been transformed into a system meant to serve one master. The revolution that Boris Yeltsin had started when he helped bring down the Soviet Union in 1991, however flawed, however unfinished, had been ended by his handpicked successor, a man drawn from the ranks of the old KGB. "The Russian people," Putin's chief of staff, Alexander Voloshin, regularly told colleagues behind closed doors, "are not ready for democracy."

This account of Putin's rise to power and his campaign to consolidate authority in his Kremlin was drawn from interviews with dozens of Russian political figures, including Putin advisers who had rarely spoken to Western journalists before. Out of fear of retribution, many of them shared their insights on the condition that they not be named.

Putin, now 52, had come to office promising stability after a decade of dislocation. But in 2004, four years later, his Russia was a country of contrasts, with a booming economy floating on oil and with political space for dissent rapidly disappearing. Creeping crises threatened the future, whether a demographic collapse fueled by alcoholism and AIDS that could slice the Russian population by a third in coming decades or the blood-feud war in Chechnya that had left hundreds of thousands dead, injured or homeless and spawned a wave of horrific terrorism.

But Putin was running for reelection with soothing words for his tired nation. His prime minister was as unpopular with the public as Putin was popular, and there would be no ballot-box consequences if he were jettisoned. "The time of uncertainty and anxious expectations is past," Putin had told voters in his one and only campaign appearance.

'Project Putin'

Physically, Vladimir Putin was hardly a dominating figure in any room, a relatively slight man at 5 foot 9, rail-thin with a retreating hairline, hard eyes and a strained, joyless smile. In keeping with his KGB training, he had a skill for listening and taking on the persona desired by his interlocutors.

But Putin was not a born president. He commanded no mass following, articulated no grand vision for his country, had never been elected to public office. At the moment when Yeltsin publicly anointed him his chosen successor in 1999, polls showed his popularity rating at just 2 percent. He was the creation of one of the most extraordinary political projects in history -- "Project Putin," as some of those in the Kremlin came to call the effort they were enlisted to run.

Putin's main virtue to the Yeltsin clan known as the Family was his loyalty. He once helped spirit his former boss, St. Petersburg Mayor Anatoly Sobchak, out of the country at a time when prosecutors were bearing down. That move made an impression in the Kremlin, where Yeltsin's advisers worried about retribution after he left office.

Igor Malashenko, a television executive who helped Yeltsin win reelection in 1996, was among the first to hear rumors that Putin would assume the presidency. Curious, he wangled a dinner invitation with the little-known spy. Not long after, Malashenko was summoned to the home of Valentin Yumashev, a Yeltsin aide.

"He asked me directly to support Putin as successor to Boris Yeltsin," Malashenko recalled.

"How can you trust him?" Malashenko asked Yumashev.

"He didn't give up Sobchak," Yumashev answered. "He won't give us up."

Backed by the tycoon Boris Berezovsky, the Kremlin advisers made it their mission to turn Putin into a credible successor. They taught him how to walk and talk like a president, how to dress, how to behave in public. "He was a fast learner," recalled Igor Shabdurasulov, a Putin aide.

But more important, they mustered the power of the state behind him, particularly state television, managed by Berezovsky, which lavished praise on Putin while tearing down his challengers with a vicious smear campaign. "I'm not defending the ethics of that process," Shabdurasulov said. "There were many things that today might not look all that pretty. But politics is a dirty business."

Project Putin worked. The former spy became acting president on New Year's Eve 1999 and was formally elected three months later. His first act in office was to sign a decree granting Yeltsin and his family immunity from prosecution.

But if the Yeltsin clan viewed him as a loyalist they could control, they were wrong. The project had a life of its own. A few months after his election, Putin gave a speech at a closed-door ceremony at the Lubyanka headquarters of the old KGB. The occasion was a Stalin-inaugurated holiday known as the Day of the Chekist, marking the founding of the Soviet secret police originally known as the cheka. Gathered there to listen to Putin were about 300 generals from the KGB and its successor agency, celebrating the rise of one of their own.

"Instruction number one for obtaining full power has been completed," Putin announced to the generals.

The few civilians in the hall thought it was a joke.

Only later, one recalled, would they realize how serious he was.

Control of Networks

Putin was obsessed with television. Each night he would bring home videos of that day's newscasts to watch how he was covered, then return to the Kremlin the next morning with his judgments. "He watches himself on television, he goes through everything," a top aide confided.

The new Russian president grew particularly irate early in his tenure when the submarine Kursk sank in the Barents Sea in August 2000 and Russian television aired tough reports about the government's slow response and dishonest public statements. Even state-controlled Channel One, under Berezovsky's control, broadcast critical segments, including interviews with the wives of Kursk sailors distraught at the way the situation was being handled.

Outraged, Putin called personally to rail about the report and accuse the journalists of faking it. "You hired two whores . . . in order to push me down," Putin exclaimed, as anchor Sergei Dorenko remembered it. Dorenko was taken aback. "They were officers' widows," he said, "but Putin was convinced that the truth, the reality, did not actually exist. He only believes in [political] technologies."

Putin's anger boiled over at a closed-door meeting with relatives of the crew six days after the submarine sank. When fuming relatives shouted him down, saying they knew from television that the Russian government had initially turned down foreign assistance, Putin bristled.

"Television?" he exclaimed. "They're lying. Lying. Lying."

After that, the die was cast. Determined to dominate television, the Kremlin drove Berezovsky, who controlled Channel One, and Vladimir Gusinsky, the owner of independent NTV, out of the country and seized control of both networks. No one understood better than Putin just how powerful television could be in the new Russia. "He came to power through television, and that's why, to have an independent channel that covers 65 percent of Russia, that creates a danger," the top aide said.

With troublesome owners out of the way, the Kremlin convened meetings each Friday with the top television directors at which Putin aide Vladislav Surkov, Kremlin consultant Gleb Pavlovsky and others handed out weekly talking points. Over time, the agenda became nakedly political, aimed at supporting Putin and his political party, United Russia. "It turned into an instrument of control," one participant said later. ". . . It was so direct and unsophisticated, like propaganda."

At each session, a written agenda was handed out with the week's expected news topics and recommended approaches. "At some point," the participant said, "the list started including the phrase 'recommendation -- don't cover.' It was things not to mention, like Chechnya."

As parliamentary elections approached in 2003, the Kremlin dispensed with even that subtlety and dispatched Marat Gelman, a top political strategist, to oversee Channel One. His programs, Gelman later said, were all guided by a single mission: "to create the image of United Russia and to destroy the Communists."

A Turning Point

By that summer of 2003, the Kremlin had taken a turn. Since the beginning of his presidency, Putin had balanced the remnants of the old Yeltsin crowd with his compatriots from the KGB known as siloviki, or men of power. But now the veterans of the Family noticed the balance of power shifting away from them.

"We got the feeling that something changed for the wrong direction," one Yeltsin alumnus said. When he went to the Kremlin each day, he found the place filled with unfamiliar faces, "a whole floor of former or current KGB" in newly prominent positions on the president's staff.

Chief among the siloviki faction were two shadowy presidential deputy chiefs of staff, Viktor Ivanov and Igor Sechin, both with KGB backgrounds and both longtime Putin associates who had followed him from St. Petersburg to the Kremlin. Ivanov was put in charge of personnel, and he used his power to eliminate the commission that recommended pardons for prisoners. Sechin controlled the paper flow that reached Putin and served as the president's guardian. "His main asset is his loyalty," said Valery Pavlov, who had worked with both men in St. Petersburg.

Other key veterans of the KGB or its successor, the FSB, were in place as defense minister, interior minister and head of a powerful new anti-drug agency that was making politically charged arrests around the country. The siloviki viewed their rise as the natural ascension of the country's elite, back to save the country from itself more than a decade after the collapse of the Soviet Union.

"We are like some kind of demigods, doing something that will either save Russia or badly damage it," Viktor Cherkesov, a onetime KGB dissident-hunter said wryly last year after becoming head of a new anti-drug police force.

The turning point came when Russia's richest man, the oil tycoon Mikhail Khodorkovsky, began building up political influence in defiance of Putin's monopoly on power. By funding opposition parties and nongovernmental organizations, cutting a deal with China for a new pipeline, negotiating a partnership with a U.S. oil giant and trying to extend his sway in parliament, Khodorkovsky had enraged the siloviki.

The tension came to a head during a meeting between Putin and the country's main moguls, known as oligarchs, when Khodorkovsky challenged the president about the corrupt sale of a state oil field. Putin responded sharply, reminding Khodorkovsky that he had obtained his own company, Yukos, through manipulated government auctions in the 1990s.

The other oligarchs winced. "The whole thing came loose after that," Igor Yurgens, vice president of the oligarchs' association, recalled afterward. Some of Khodorkovsky's partners instantly understood the peril, as well. "It was clear to me that we had signed our own death warrants," said Alexei Kondaurov, a top Yukos executive.

Even some Putin aides were surprised at the president's outburst. "Putin just exploded," one said later. "I didn't expect such a reaction. He was just out of control." When he asked Putin about the rigged deal that Khodorkovsky had complained about, the aide recalled, "I discovered he knew about this deeply. I wouldn't say he was himself involved, but he had allowed this to happen."

As his pique grew, Putin later summoned Khodorkovsky back to the Kremlin to ask about a report he had received. Was it true, Putin asked, that Khodorkovsky had met with the Communist Party leader, Gennady Zyuganov, and offered his support? Khodorkovsky denied it.

"Putin was furious," a well-connected government official said, "because he already had the minutes from the conversation between Khodorkovsky and Zyuganov, and the minutes came not from the FSB [the successor to the KGB] but from the Communist Party staff. And when someone lies to the president, it makes it personal."

Kasyanov, Voloshin and other aides tried to intervene on Khodorkovsky's behalf, explaining that Voloshin had authorized the political financing. No, Putin shot back. "That's Khodorkovsky. It's his game. He wants to buy parliament. I can't allow this."

Khodorkovsky was later arrested on fraud and tax evasion charges and his company dissected and partially renationalized. A state oil company headed by Sechin ended up with Yukos's major subsidiary, Yuganskneftegaz. Khodorkovsky was sentenced to nine years in prison just last week.

Last Link Severed

By the time Putin decided to fire his prime minister in mid-campaign, Mikhail Kasyanov was perhaps the only well-known political figure left in Russia who could openly challenge the president if he chose to.

The ascendant siloviki had long agitated for Kasyanov's ouster. The prime minister was the last senior link to the Yeltsin days and virtually the only member of Putin's government who had offered even token public disagreement when Khodorkovsky was arrested. He had fought with Putin in private sometimes as well. When heavily armed Chechen rebels seized a theater in the heart of Moscow, Putin ordered commandos to prepare to storm the building. Kasyanov argued with him, fearing a blood bath. Putin responded by sending him to an international conference in Mexico.

"Putin doesn't like to have discussions," a senior Russian official said. "You shouldn't demonstrate weakness to people. He was always saying, 'As soon as people see you're weak, they will beat you immediately and you will lose.' That's why he does all he does to demonstrate he is strong."

And now Kasyanov's rivals had effectively poisoned the president against him, warning that the prime minister was entertaining offers from the defeated remnants of Russia's democratic opposition to lead their comeback. "His people took that fact and accelerated it into this great story," recalled the senior official.

Putin had signaled his discontent just two days earlier, clashing with Kasyanov at a closed-door cabinet meeting over the cutoff of gas deliveries to neighboring Belarus. The discussion became so heated that the normally reserved president abruptly ended the session.

But according to an account Kasyanov later gave associates, the prime minister had no sense of his impending ouster until Putin canceled their daily meeting the morning of Kasyanov's final day in office. When Putin summoned him that afternoon, the president was so intent on getting rid of Kasyanov he hadn't even been fully briefed on the procedures for firing the prime minister -- which required Putin to fire the rest of the cabinet as well. Photographers recorded the shocked faces of cabinet ministers who had been fired but had never been served notice of their dismissal by the president.

In the end, it had come down to television once again.

Project Putin had succeeded back in 1999 through the power of manipulated airwaves, and Putin could not now trust Kasyanov with control of such a potent instrument, even for a short interregnum between elections. "He understood that television could be switched," the senior official said, "and everything could be turned in one month."

Vladimir Putin has worked to quell rivals.Russian President Vladimir Putin and Prime Minister Mikhail Kasyanov, right, took part in a wreath-laying ceremony in Moscow on June 22, 2002. In 2004, Putin fired Kasyanov.Putin, right, conferred in 2003 with Kasyanov, who was stunned by his later dismissal.