By James Pearce
BBC sports correspondent
Last October, Juan Antonio Samaranch stood before the members of the International Olympic Committee for one final time.
He'd come to Copenhagen to support Madrid's bid to host the 2016 Games. Madrid was an outsider in a contest that had been expected to end in a showdown between Rio and Chicago.
"I know that I am very near the end of my time," Samaranch said. "I am, as you know 89 years old. May I ask you to consider granting my country the honour and also the duty to organise the Games in 2016. Thank you."
A few hours later Madrid defied the odds to beat Chicago and Tokyo and reach a final vote against Rio. Samaranch's emotional intervention was credited with being the main reason for the late surge in support for the Spanish capital.
No individual commanded greater respect within the IOC than Juan Antonio Samaranch, the man who had led the organisation for 21 years from 1980 to 2001. The voting demonstrated that once more.
The endearment is perhaps surprising considering that Samaranch had led the IOC through its greatest crisis.
The Salt Lake City scandal rocked the whole Olympic movement. In 1998 a Swiss IOC member, Marc Hodler, blew the whistle on the corruption in the bidding process.
An internal inquiry found that as many as 20 of the IOC's 110 members had been bribed to back Salt Lake's bid to host the 2002 Winter Olympics.
Some had been given holidays, others jobs or university places for their relatives. One member's wife had even received free cosmetic surgery - 13 IOC members ended up losing their positions.
Samaranch was never found guilty of any wrongdoing, but some blamed him for having turned a blind eye to all the corruption.
By the time that Samaranch stepped down as IOC President in 2001 it was inevitable that his reputation had been tainted.
So why then did the IOC's members stay so loyal to their former president?
A cynic would say that they were simply sticking by a man who had enabled them to line their pockets for so many years.
For one or two of them maybe that was the case, but the truth is that there is a genuine belief within the Olympic movement that the modern Olympics simply wouldn't be the same if it hadn't been for Samaranch, and the Spaniard's supporters have a point.
In the 1970's the Olympics were facing financial meltdown. Montreal has only just finished off repaying the debt it stacked up from hosting the 1976 Games. There was a real possibility that no city would come forward to offer to host a future Olympics.
Contrast that with the situation 30 years on. The 2012 Games were contested by five of the world's biggest cities - London, New York, Madrid, Moscow and Paris.
Juan Antonio Samaranch can take much of the credit for this. After Los Angeles had been elected unopposed as the host city for the 1984 Olympics everything changed.
The Games made a profit of $235 million - the first to finish with a surplus since 1932.
The following year, under Samaranch's leadership, the IOC set up The Olympic Programme (TOP), an exclusive club for major global sponsors.
It still exists now and brings in hundreds of millions of pounds. At the same time television companies were persuaded to part with large sums of cash.
Suddenly the Olympic rings had become one of the world's most marketable symbols. The Olympic movement had been saved.
Of course Samaranch cannot take all of the credit for the financial revival of the Olympics. Similarly he certainly cannot take all of the blame for the consequences of what happened when the money started to flow too freely into the wrong people's hands.
It is, though, fair to say that the modern day IOC wouldn't be the same if it had not been for Juan Antonio Samaranch.
It could well be the case that future Olympic historians will treat the corruption scandals as a minor blip, while the turning of the Games from loss to profit is viewed as the action that saved the type of Olympics that we see today.