The railroads under Yakunin have been no exception. The network barely expanded during his 10 years in charge, but the average speed at which freight trains traverse it dropped 5 percent between 2004 and 2014, suggesting poor maintenance. Last year, RZD lost 99 billion rubles ($A2.05 billion). Yakunin blamed a government decision to freeze rail tariffs for oil companies, which benefited Rosneft and Gazprom, but the real problem was that he had allowed the company's operating costs to almost triple during his tenure, increasing faster than revenue.

The money didn't just go down the drain. Anti-corruption activist Alexei Navalny documented the construction of an enormous estate for Yakunin near Moscow, including a special facility to store fur coats (the Russian name for it, shubokhranilischche, became a popular meme to describe Putin-era corruption). Though Yakunin later denied the existence of the fur storage annex and said he'd sold the house, Navalny continued his pursuit and showed that Yakunin's son, a wealthy hotelier, was doing lucrative business with the railroad monopoly. Again, official denials followed, but plausible explanations of Navalny's facts didn't.

Both Yakunin and Rosneft's Sechin refused to declare their incomes and property last year, after the government demanded that managers of state companies do so. Yakunin even threatened earlier this year to leave RZD for the private sector if the demands persisted. In March, he, Sechin and Gazprom chief Alexei Miller were officially allowed not to publish their income and property declarations, but two months later Yakunin revealed that his salary ranged between 4 million to 5.5 million rubles per month ($A82,000 and $113,000) -- not enough for the lavish lifestyle Navalny described.

At the same time, Yakunin is one of the most vocal proponents of anti-Western conspiracy theories that underpin Putin's foreign policy, but which Putin himself is careful to moderate in his public statements. In a recent article on an obscure website, Yakunin denounced globalisation as the evil master plan of a supranational financial oligarchy, explaining that lower oil prices were "an element of global financial war recognised by the American establishment." According to Yakunin:

Russian President Vladimir Putin may need someone with genuine business acumen to run the Russian state railways JASON REED

"The global financial system is a tool of the global financial oligarchy to rob developing nations and create a system of global US dominance."

The rambling text went viral and the website promptly crashed as bloggers ridiculed Yakunin.

The final straw may have come from an embarrassment earlier this month, when Latvia's anti-corruption bureau detained the head of its national railroad company, Ugis Magonis, who is married to Yakunin's niece. RZD said soon afterwards that it was stopping cargo transit to Latvian ports, allegedly due to the poor condition of the Baltic nation's rail network. Latvian Prime Minister Laimdota Straujuma said in an interview that she considered the move a response to Magonis's detention.

In any case, Putin's old friend had become a liability and will now retire gracefully. Yakunin's plan, clearly sanctioned from on high, is to become a member of Russia's do-nothing upper house of parliament.

The choice of a new chief for Russia's rail system will answer an important question: Is Putin still aiming for loyalty first, or has he begun to stress competence? Russia needs to dig in for a long period of low energy prices, which means that tighter cost controls -- including a clampdown on corruption -- will be necessary in the all-important state companies. If Yakunin is replaced by a technocrat without personal ties to Putin, changes at Gazprom and Rosneft will probably be imminent, too. If another crony steps into Yakunin's shoes, that will mean Putin is still cruising without a compass, hoping his propaganda machine will be sufficient to keep him in power, no matter what.

Leonid Bershidsky, a Bloomberg View contributor, is a Berlin-based writer.