Great Britain claimed a dramatic gold in the 4x100m relay but Usain Bolt pulled up injured in the home straight as his career ended in disappointment at London 2017.
The British quartet of CJ Ujah, Adam Gemili, Danny Talbot and Nethaneel Mitchell-Blake were 10/1 third favourites with Sky Bet but pipped the United States to gold in a world-leading 37.47 seconds, which was also the third fastest in history.
Bolt was trailing in third when he pulled up on his anchor leg before collapsing to the track as his bid for a 20th global gold came to an agonising end.
Britain's winning time, a combination of Ujah's perfect reactions, flawless changeovers and a superbly-timed dip from Mitchell-Blake to cross the line ahead of 100m silver medallist Christian Coleman, was a new national record, erasing the 18-year-old mark of 37.73. The USA took silver in 37.52secs and Japan the bronze.
Mitchell-Blake, who had to settle for fourth in the individual 200m, roared with delight at the finish in scenes similar to Mark Lewis-Francis' cries of delight when he crossed the line at the 2004 Athens Olympics to earn Britain sprint relay gold.
The victory made it a night of double sprint relay joy for the hosts as the women's team of Asha Philip, Desiree Henry, Dina Asher-Smith and Daryll Neita won silver in 42.12s.
The tale since Athens for Britain has been one of missed chances and baton blunders. But no more, and the joy amongst the team was evident at the finish.
Ujah told BBC Sport: "I am proud of these guys and those behind the scenes. It is crazy to do this in London."
Gemili, controversially overlooked for selection in the individual 200m, said: "It's crazy, honestly a dream and a reality tonight. Wow."
"We are world champions at home. We will never get this feeling again," Talbot added.
Mitchell-Blake said: "I wasn't sure if I had won or not, I gave it my all, but I could see Christian Coleman out of the corner of my eye. The feeling of euphoria was from infinity. I can't register it. We smashed the British record to pieces."
While Britain celebrated, though, there were contrasting emotions for Bolt in the final race of his career.
The 30-year-old pulled up on the home straight as he sought to chase down the United States and Britain, hobbling for a few strides before falling to the track.
His team-mates gathered round him and the 19-time global champion was helped to his feet and limped over the line, applauding the crowd as he did so.
It was a sad way for Bolt to bring the curtain down on the greatest athletics career the world has ever seen since his record-breaking runs and gold medals at the 2008 Olympics.
The greatest sprinter of all time will be remembered for racking up 19 major gold medals overall throughout his legendary career, with 11 won across five world championships and the other coming from his three Olympic Games dating back to Beijing, when he burst onto the scene in record-breaking fashion.
The only other times he failed to medal in any individual or relay event he entered since then was when false-starting in the 100m final at Daegu 2011, while the 4x100m gold he helped Jamaica win at the Beijing 2008 Olympics was stripped earlier this year due to Nesta Carter's failed drugs test.
As if we needed any further indication that Bolt was special, he is due to perform one final lap of honour round the London Stadium on Sunday night.
As well as his 100m and 200m world records, he also surely holds the one for most laps of honour performed too.
But, after four successive sprint relay golds at the World Championships, Jamaica's reign is over.
Usain Bolt's major medals
All gold unless stated
World Championships
London 2017 - 100m (bronze), 4x100m
Beijing 2015 - 100m, 200m & 4x100m
Moscow 2013 - 100m, 200m & 4x100m
Daegu 2011 - 200m & 4x100m
Berlin 2009 - 100m, 200m & 4x100m
Osaka 2007 - 200m (silver), 4x100m (silver)
Olympic Games
Rio 2016 - 100m, 200m & 4x100m
London 2012 - 100m, 200m & 4x100m
Beijing 2008 - 100m & 200m
How Usain Bolt won his golds
2008 Olympic Games, Beijing - 100m
Bolt announced himself as a sporting superstar by storming to the 100m crown in a world record 9.69 seconds, even slowing down to celebrate before reaching the line.
2008 Olympic Games, Beijing - 200m
The Jamaican ended Michael Johnson's reign as world record holder by racing to victory in 19.30secs.
2009 World Championships, Berlin - 100m
Bolt shattered his world record with a run of 9.58s to take gold.
2009 World Championships, Berlin - 200m
The world's fastest man took the 200m mark to new heights by clocking 19.19.
2009 World Championships, Berlin - 4x100m relay
Bolt added a third gold with his Jamaican team-mates in the sprint relay in a time of 37.31.
2011 World Championships, Daegu - 200m
Having been sensationally disqualified from the 100m final for a false start, Bolt bounced back in the 200m, taking the title in 19.40.
2011 World Championships, Daegu - 4x100m relay
Bolt finished the championships with another gold and another world record as Jamaica won the relay in 37.04.
2012 Olympic Games, London - 100m
Bolt answered doubts about his form and fitness in emphatic fashion by defending his crown in 9.63, an Olympic record.
2012 Olympic Games, London - 200m
He became the first man in history to retain both the Olympic 100m and 200m titles, winning over the longer distance in 19.32 and declaring afterwards he was a ''living legend''.
2012 Olympic Games, London - 4x100m relay
Bolt left the capital with another world record in the relay, Jamaica winning in 36.84.
2013: World Championships, Moscow - 100m
The 26-year-old defied pouring rain and a drenched track to hold off Justin Gatlin and reclaim his crown in 9.77, his best time of the year.
2013: World Championships, Moscow - 200m
The world's fastest man blazed to victory with an emphatic performance at the Luzhniki Stadium, storming to glory in 19.66.
2013: World Championships, Moscow - 4x100m relay
Bolt took his World Championships career medal tally into double figures by anchoring Jamaica to gold in 37.36.
2015: World Championships, Beijing - 100m
Riding to the rescue of his beleaguered sport once again, Bolt dashed Gatlin's hopes of 100m in China. The Jamaican lived up to his billing as the saviour of athletics as he held off the challenge of two-time drug cheat to win in 9.79.
2015: World Championships, Beijing - 200m
Made it four straight half-lap world titles, blowing away Gatlin with a world-leading 19.55 time in front of a raucous Bird's Nest crowd.
2015: World Championships, Beijing - 4x100m relay
Bolt wrapped up another event to remember by anchoring Jamaica to victory in a world-leading time of 37.36.
2016 Olympic Games, Rio - 100m
Bolt overcame a now trademark sluggish start to power home in the final 50m and cross the line first in a season's best of 9.81, beating rival Gatlin into second.
2016 Olympic Games, Rio - 200m
Bolt targeted the world record ahead of the race but rain ruined that prospect and, although he was a comfortable winner, he had to settle for a season's best time of 19.78.
2016 Olympic Games, Rio - 4x100m
The 29-year-old completed what at the time was a 'triple triple' of Olympic sprint titles, taking the baton from Nickel Ashmeade and storming away from second-placed Japan on the final leg.
- Bolt was earlier this year stripped of his 4x100m relay gold medal from the 2008 Olympics after one of his team-mates, Nesta Carter, retrospectively failed a drugs test taken at the Beijing Games.
Related links
Mo Farah wins 5,000m silver
Latest London 2017 odds
London 2017 guide
London 2017 medal winners
Usain Bolt column