At the finish Mo Farah threw a one-two at the sky and then howled, as if trying to scare away forever the banshees that have pecked him these past six months. Just half a second back Andy Vernon – the journeyman 28-year-old from Aldershot with the build of an army PT instructor – was bustling his body into silver.

Victory was not supposed to be this precarious for Farah, the reigning Olympic and world 5,000m and 10,000m champion against such a modest field. Sometimes, though, one has to take what one can get.

Though the race had the classic elements of a Farah victory – the pre-race Mobot, taking up the pace with 400m remaining and holding off all challengers on the home straight – it was not a classic performance. How was it ever going to be, given the unexpected trials and tremors that have dogged him this year?

Understandably, after collapsing at the finish of the New York half marathon, racing only once on the track in 12 months and having to spend four nights in hospital after falling unconscious in his bathroom 40 days and 40 nights ago, he was just happy to be out of the athletics wilderness.

“To come out here and win meant more than anything else in the world,” said Farah. “Two weeks ago there was doubt I was going to compete here and I’ve still got four stitches in my ear from collapsing in the bathroom. It was hard but at the same time I got over it. I had been suffering with really bad stomach pain. They thought it was something wrong with my heart. Only my family and my coach Alberto Salazar ever knew the full story.”

When pressed, Farah said that the suspected heart problems had turned out to be a problem with one of the muscles in his stomach. After the race there was a hug for his friend Usain Bolt, noticeable even in a hoodie and sunglasses. Meanwhile Vernon was happy to make headlines for the right reasons.

Two weeks ago at the Commonwealth Games, Vernon became infamous for a Twitter spat with the Scottish athlete Lynsey Sharp, who called him “Andy Vermin” after he told her, “You won a medal? You should mention it now and again” and “I don’t use a drip to get my medals.”

Vernon later apologised on Twitter for “a joke that got out of hand” and, more formally to Sharp on Monday at the team hotel. But after his silver medal Vernon preferred to concentrate on his own performance. “This medal, it is a lot of work, months and years,” he said. “You got to get up on all those cold and rainy mornings for training. It takes a lot of motivation. When I woke up this morning I knew that I had a chance on medalling. But in such a race everything has to be perfect.”

Vernon, who has been suffering with hamstring problems, admitted he did not know how he would fare. “I thought I might get to 8km and just fall apart because the endurance isn’t there but I just dug deep,” he said. “From the whole time from about 3km out we broke into a group of about six or seven and I thought “I’ve just got to beat four of these guys and I’ve got the medal” and I managed to beat all but one.”

Before the race Farah did a sheepish Mobot on being announced but the Swiss crowd – their eyes perhaps distracted by the men’s discus final – barely acknowledged it. Farah’s opening lap was pretty sheepish too: nestled into last place, 20 metres behind the leaders, as if asking what they had.

Against one of the sharp Kenyans or Ethiopians he surely never would have been this blasé. But he soon had to adjust his plans when the Italian Daniele Meucci, who has run a respectable 27min 36.53sec this season, began to push up the pace.

It was not particularly quick but by halfway the field of 24 was spreadeagled, with a leading group of seven behind driven on by two unheralded Turkish athletes by way of Kenya – Polat Kemboi Arikan and Ali Kaya – with Farah in third and Vernon hanging on.

But as the lap counter ticked down, the moribund pace did not pick up. This was perfect for Farah, who can run 400m in under 51 seconds. He waited for the bell and kicked. And while it took a while for his body to rev up fully up, a final lap of 54.41sec was enough for gold and a welcome return to glory.