MOSCOW - Russian President Dmitri A. Medvedev fired Moscow's larger-than-life mayor on Tuesday, apparently winning - at least for now - a battle with an enormously powerful political opponent.

The mayor, Yuri M. Luzhkov, has ruled Russia's largest and wealthiest city with an unshakable hand since 1992. He was one of the first political figures swept into power in the early and turbulent post-Soviet years, and the last of the generation that rose to rule alongside Boris N. Yeltsin.

The dismissal sent political observers here on a search for superlatives - some called the ouster the end of a political epoch. It also offered a tantalizing hint to the question that has tormented Kremlin watchers ever since Medvedev took office as president in 2008, replacing Vladimir Putin, who became prime minister:

Is Medvedev his own man, or a Putin puppet?

"It's a victory for President Medvedev," said Mark Urnov, head of a Moscow think tank, "that he has the ability to dismiss a person of such heavy political weight."

Although the 74-year-old Luzhkov was often criticized - he bulldozed historic buildings to make way for glassy malls and soaring office buildings, and his construction-magnate wife was widely described here as a billionaire and the world's third-richest woman-he seemed, until recently, untouchable.

That is, until earlier this month, when one of Russia's tightly controlled television stations broadcast a program that accused Luzhkov and his wife, Yelena Baturina, of profiting handsomely from the mayoral office and running roughshod over the city. The program accused Moscow's first couple of unseemly profit in a country where corruption is a well-practiced art.

Luzhkov was elected when he took office in 1992. But since 2004, he and other mayors and provincial governors in Russia have been appointed by Putin, rather than chosen at the ballot box - part of Putin's effort to tighten his hold over Russia's political machine. Putin declared complete control over Russian officialdom, vowing unity, and a direct line of authority, from the highest office to the lowest.

As an ally of Putin, Luzhkov had a prickly relationship with Medvedev, whose presidency was unfolding under the prime minister's formidable shadow.

But after Luzhkov publicly criticized a Medvedev decision to stop construction of a highway that was to bisect an ancient forest, the strained interaction dissolved into open conflict.

Television attacks mounted. Speculation swept Moscow that the dispute between Luzhkov and Medvedev would end in Luzhkov's departure as mayor. Luzhkov, however, returned from a vacation in Vienna, strode into his office on Monday and announced that he had no intention of resigning.

On Tuesday, Medvedev, on a state visit to China, signed a decree saying he had lost confidence in the mayor and was firing him.

"This dismissal is a sign we are entering a new political era," said Vladimir Milov, a former energy minister and member of the democratic opposition. "The myth of that top-down unity is now in doubt."

If Luzhkov's departure meant a change in politics, it also meant a change in prospects - at least for Medvedev.

"It means," said Boris N. Nemtsov, a member of the democratic opposition, "that Medvedev has a chance to be a real president."