|By Denis Pinchuk and Dmitriy Rogovitskiy

|By Denis Pinchuk and Dmitriy Rogovitskiy

|By Denis Pinchuk and Dmitriy Rogovitskiy

MOSCOW (Reuters) - President Vladimir Putin risks personal humiliation if all Russian competitors are banned from the Rio Olympics over doping, as now seems possible; yet the man on whose watch this may happen, Sports Minister Vitaly Mutko, is not being fired.

The reason: Mutko has delivered victories on the sports field for the past decade and a half to match Putin's ambition of restoring national pride, and the Russian leader stands by the people who give him loyal service.

"Putin trusts him. Putin knows you can work with Mutko," said Mikhail Amosov, who had dealings with both men when they worked in the mayor's office in St Petersburg in the 1990s.

Putin's patience with his subordinate is undergoing its severest test this week after an independent report alleged that Mutko's own deputy was a lynchpin in a program to facilitate doping by covering up athletes' positive test results.

The International Olympic Committee, reacting to the report, said on Tuesday it would consider barring Russia from taking part in the Rio games in any disciplines; a step that would be unprecedented in international sport.

The Court of Arbitration in Sport cleared the path for a blanket ban on Russian competitors going to Rio when it rejected an appeal on Thursday against the earlier exclusion of Russian track-and-field athletes from the games.

Nevertheless, Kremlin spokesman Dmitry Peskov said Mutko was not among sports officials set to lose their jobs because he was "not mentioned in the ... report as a direct perpetrator".

Putin's decision to stand by his minister suggests he values trust and loyalty above narrow definitions of managerial competence.

"Putin does not change and does not surrender 'his' guys," said a second person who worked with both men in the St Petersburg mayor's office and did not want to be identified discussing sensitive topics.

SOCCER PROJECT

Reuters spoke altogether to six people who worked with Mutko over the years; they described a fast-talking fixer who got things done and had a knack for taking run-down sporting institutions and giving them a touch of success and glamor.

In the early 1990s Putin worked as a deputy mayor in his native St Petersburg, Russia's second city. Mutko was another deputy mayor, responsible for social spending.

Another colleague from the mayor's office said that at the time Mutko did little to distinguish himself from other mid-level bureaucrats.

"He was a hard worker, but did not particularly take initiative," said the former colleague, who did not want to be identified discussing people who are now in positions of power.

While in the mayor's office, Mutko started a project that would define his career. He took under his wing St Petersburg’s Zenit football club. It had fallen on hard times; it had little money and results on the pitch were poor.

Mutko was club president from 1997 until 2003, and in that period he found money, attracted star players and returned Zenit to the top flight of Russian soccer.

Alexei Igonin, Zenit's captain in the early 2000s, said Mutko was a hands-on president. Players did not use agents because they would negotiate their deals directly with Mutko.

"He has charisma and speaks well, while he mixes in the right circles and gets the contacts he needs," said Igonin.

Mutko's success at Zenit caught the eye of Putin, who had become Russian president in 1999.

"To make Zenit a good soccer club was Mutko's project," said Amosov, who was a member of the St Petersburg legislature in the 1990s and has since became an outspoken Putin critic. "Putin appreciated his performance and took him to Moscow, a move Mutko never desired. It seems to me Putin decided that Mutko can do a lot for Russian sport in general, after doing a lot for Zenit."

In 2005, Mutko became head of the Russian Football Union, and set about making changes in the same energetic way he had in St Petersburg.

Vyacheslav Koloskov, the man he replaced, recalled how Mutko took away the company car, the office and pension that he was still enjoying at the union's expense.

Afterwards, said Koloskov, "I met him at different committees and conferences, but he never needed my help and advice, as he always believed he knew everything".

At the football union, Mutko laid the groundwork for Russia's successful bid to host the 2018 soccer World cup.

GAFFES

In 2008, Putin made Mutko sports minister, calculating he would bring the success he had achieved in soccer to other sports. In this higher-profile job, Mutko made some gaffes.

Government auditors queried how he was able to spend 4,800 Canadian dollars ($3,680) on breakfasts at his hotel during the 2010 Winter Olympics in Vancouver. He said he was assigned the hotel by organizers, so had no control over the costs.

In the same year, Mutko was mocked by many Russians on social media for a speech to FIFA, world soccer's governing body, in thickly-accented and halting English.

For Mutko's 57th birthday last year, Putin ribbed him about his language skills by publicly presenting him with an English phrase-book.

Still, Mutko's stock stayed high at home, largely because Russia's international sporting performances improved dramatically under his stewardship. Those successes boosted Putin's agenda of a strong, powerful and resurgent Russia.

The high point was the 2014 Winter Olympics in the Russian resort of Sochi, when Russia topped the medal table and won 13 gold medals. Four years earlier in Vancouver, they had come 11th and picked up only three golds.

That success was achieved, on the evidence of this week's report commissioned by the World Anti-Doping Agency, because Russian sporting officials set out to win at any cost, even if it meant cheating.

DOPING COVER-UP

The report alleged Mutko's ministry directed a system for covering up positive doping test results. This involved entering false results into computer records to make them appear clean or, during the Sochi Games, physically replacing "dirty" urine samples with clean urine stockpiled in advance.

The report, commissioned by the World Anti-Doping Agency, said it had email evidence that on one occasion, Mutko personally ordered a cover up of a positive result for a foreign footballer playing in the Russian league.

On the evidence of the former head of Russia's anti-doping laboratory, who testified for the report, it is "inconceivable Minister Mutko was not aware of the doping cover up scheme", the report said.

Mutko's office did not respond to a request for comment submitted by Reuters. Russia's R-Sport news agency quoted Mutko as saying there were no allegations directed at him, nor could there be, and he was devoted to fighting doping.

A source who worked closely with Mutko since he became sports minister offered an explanation of how he is holding on.

"I think it's something to do with the political system in Russia. When your people are being attacked, Putin will protect those people whom he appointed and trusted for so long."

(Additional reporting by Jack Stubbs; Writing by Christian Lowe; Editing by David Stamp)