Usain Bolt brought the track action at London 2012 to a fittingly brilliant close tonight, anchoring the Jamaican 4x100m relay team to gold in a new world record.

Bolt was only level with American Ryan Bailey when he took the baton after the first three legs run by Nesta Carter, Michael Frater and Yohan Blake, but stormed down the home straight to stop the clock at 36.84 seconds, taking 0.2secs off their previous record.

The United States claimed silver and Trinidad and Tobago the bronze after Canada, who had crossed the line in third, were disqualified after Jared Connaughton was adjudged to have run outside his lane on the third leg.

Jamaica's win means Bolt has retained the three titles he won in Beijing four years ago, but asked if he could do it again in Rio in 2016, the 25-year-old said: "I've thought about it but I think it's going to be very hard because Yohan, he's just come into the game and he's running pretty well, and I'm sure there's going to be a lot more cats coming up to run.

"I'm just happy. I'll take it a step at a time."

Britain's Mo Farah had earlier dedicated his twin gold medals to his unborn twin daughters after becoming only the sixth man in history to complete the Olympic long-distance double.

Seven days after winning the 10,000m, Farah took advantage of a slow race in the 5,000m to hit the front with 700m remaining and was never headed, covering the last lap in under 53 seconds to hold off Ethiopia's Dejen Gebremeskel to win in 13mins 41.66sec. Thomas Longosiwa of Kenya claimed bronze.

The 29-year-old therefore added his name to the illustrious group of men who had previously taken the 5,000m and 10,000m titles at the same Games - Emil Zatopek of Czechoslovakia in 1952, Vladimir Kuts of the USSR in 1956, Finland's Lasse Viren in 1972 and 1976, Miruts Yifter of Ethiopia in 1980 and countryman Kenenisa Bekele at Beijing four years ago.

"It's an unbelievable feeling, the best feeling ever," said Farah, who dedicated his medals to his unborn twin daughters. "Those two medals are to my two girls that are coming. They're twins so there's one for each. They could arrive any day."

Russia's Mariya Savinova produced a perfectly-timed race to claim gold in the women's 800m, beating former world champion Caster Semenya by more than a second as defending champion Pamela Jelimo faded to fourth in the home straight.

Semenya, whose victory in Berlin in 2009 was marred by controversy over her gender, finished strongly but said: "Unfortunately I was too late.

"I am happy with the silver but I know the coach (Maria Mutola) is not really happy. I didn't do a good job. You learn by mistakes and next time we'll do better. I tried hard to get back there but the body wasn't really on fire today.

"Now I have to concentrate so I can win the next Olympics."

Trinidad's Keshorn Walcott was the surprise winner of the men's javelin title, the 19-year-old claiming gold by just seven centimetres from Ukraine's Oleksandr Pyatnytsya.

Walcott's second-round throw of 84.58m proved good enough for victory, with Pyatnytsya throwing 84.51m in the third round. Finland's Antti Ruuskanen (84.12m) claimed bronze.

Russia's Anna Chicherova claimed high jump gold with a commanding performance, the 30-year-old the only woman to clear 2.05m.

Chicherova had cleared all of her previous heights at the first attempt, and although she needed two attempts to clear 2.05m, that was more than enough after America's Brigetta Barrett and Russia's Svetlana Shkolina failed the same height.

Barrett claimed silver on countback having cleared 2.03m at the second attempt.

The most predictable and emphatic win of the night came in the women's 4x400m relay as the United States stormed to gold.

The quartet of DeeDee Trotter, Allyson Felix, Francena McCorory and Sanya Richards-Ross led from start to finish to beat Russia by almost three and a half seconds. Jamaica claimed the bronze medal.