Since 2008, Mr. Medvedev has been the face and cheerleader for the nation’s supposed anti-corruption campaign. Yet a veritable kaleidoscope of corruption thrived in Moscow, much of it under the protection of a mayor who served at the president’s pleasure.

The embassy wrote of a “three-tiered structure” in Moscow’s criminal world, with the mayor at the top, the police and intelligence officials at the second tier and those regarded as a municipality’s predators — “ordinary criminals and corrupt inspectors” — at the bottom.

In this world the government effectively was the mafia. Extortion was so widespread, the cable noted, that it had become the business of the Interior Ministry and the federal intelligence service, known by their initials in Russian, the M.V.D. and the F.S.B.

“Moscow business owners understand that it is best to get protection from the MVD and FSB (rather than organized crime groups) since they not only have more guns, resources and power than criminal groups, but they are also protected by the law,” the cable noted, citing a Russian source. “For this reason, protection from criminal gangs is no longer so high in demand.”

The cable further described a delicate balance.

On one hand, the prime minister and the president benefited from votes Mr. Luzhkov delivered to the country’s ruling party, and perhaps from corruption that one embassy source said was so profligate that witnesses saw suitcases, presumably full of cash, being carried into the Kremlin under armed guard.

On the other, the corruption and a flagrantly rigged election in 2009 for the city’s legislature had raised the question of whether Mr. Luzhkov was worth the trouble.

The cable ended on a prescient note. “Ultimately, the tandem will put Luzhkov out to pasture,” it said. Eight months after this cable was written, Mr. Medvedev dismissed Mr. Luzhkov.