It was the photograph of the Games. Olympic champions Usain Bolt and Mo Farah clowning around together on top of the podium – the final moments of the very last night of athletics action in the Olympic stadium. A full-capacity crowd of 80,000 had stayed on to watch Farah's medal ceremony following the 5,000m gold medal win that cemented his status as Britain's all-time greatest athlete, and were treated to an additional surprise as the Jamaican triple Olympic gold medallist unexpectedly shot out of the tunnel to join his British friend.

The pair exchanged race celebrations, Farah performing Bolt's "To Di World" – a Jamaican dancehall move that has become Bolt's signature pose – while Bolt put his hands over his head in an M-shape to do the "Mobot" – and the stadium erupted. The two athletes have known each other for over a decade, since Bolt first came to prominence on the global stage as the youngest sprinter ever to win the 200m world junior title at the age of just 15. "Me and Mo we go way back," said Bolt afterwards, "we have the same agent [Ricky Simms], we have been through ups and downs. I've seen him train. It was good, it was a joy for me to see him get the double gold medal so it was wonderful."

After watching Farah win gold in the 5,000m Bolt says he was inspired to perform the Mobot on crossing the line in his final race of the Games – the men's 4x100m relay in which the Jamaican quartet set a new world record of 36.84sec. "Before the Olympics I said I'm going to do that," said the 25-year-old. "It escaped me two times [at grand prix races] because I was so happy that I won. But before I came out [for the relay] I watched him in his 5,000m and I made sure I remembered to do it. So for me it was fun."

Farah, who modestly baulks at the suggestion that he is anywhere near Bolt's legendary status – "No way, I'd have to break world records and win more gold medals" – said it was an honour to share the stage with such an icon. "It was good, he's a great athlete, a legend … He did the Mobot and I did the 'To the world'. I can't believe he did the Mobot as he was breaking a world record, we will be looking back in a year's time – a world record and he did the Mobot. I never thought it would take off."

Farah, whose wife is expecting twins soon – future athletes if he has anything to do with it, "apparently they have long legs like their dad" he said – went on to pay tribute to the "genius" methods of his American coach, Alberto Salazar. In just 16 months the coach known for his unorthodox use of machinery such as the cryosauna, a cooling chamber used to aid muscle recovery, an underwater treadmill, and a punishing work ethic that means Farah keeps a treadmill in his bedroom, has elevated the 29-year-old Briton from double European champion to double Olympic champion, picking up world championship gold and silver medals along the way.

Salazar's approach was blunt, and brutal. "Alberto said I run like a girl," said Farah, laughing now at the indignity of it. "I was weak." The coach worked on Farah's strength, upping his mileage and added in gruelling hill runs which initially left the Briton struggling to cope. In the Olympic Stadium he showed how the work had paid off as he finished strongly on the home straight to take double Olympic gold.

Moving to the other side of the world to train at Salazar's Oregon base last February was a huge risk to take so close to the London Games, Farah admits. "It felt like it was a gamble," says the Somali-born runner, who uprooted his wife, Tania, and daughter, Rihanna, so many miles from home. "There was a lot of questions asked at the time because I was double European champion and people were like, 'Mo why are you changing when things are going so well?' but in your mind you knew something had to change because I was coming sixth, seventh and if I didn't make that change I don't think I would have been [here] today and competing with those guys."