Great Britain's men claimed a stunning 4x100m relay gold at the World Championships as Usain Bolt pulled up injured in his final race.

On a febrile night of track and field, Mo Farah's own finale ended with 5,000m silver as he was beaten in a global final for the first time in six years.

But with the young GB women's sprint quartet storming to a silver of their own it felt like a generational shift as the stadium came alive just as it had at the 2012 Olympics.

Never before has a British team won a world sprint gold, but the quartet of CJ Ujah, Adam Gemili, Danny Talbot and Nethaneel Mitchell-Blake ran a near-perfect race to hold off the fancied US team, with Japan taking bronze as Bolt collapsed halfway down the home straight.

It was a horrible way for Bolt to end his career, suffering a muscle cramp as he attempted to chase down the two men in front of him.

A wheelchair was brought to his side before he was helped to his feet and managed to limp away, but it means he leaves his final championship with only a bronze from the individual 100m.

British sprint stars deliver for home crowd

Farah's defeat had threatened to suck the noise out of the packed stadium, with Ethiopia's Muktar Edris holding off his desperate late charge to become the first man to beat the Briton in a major final since his compatriot Ibrahim Jeilan did so over 10,000m at the 2011 Worlds in Daegu.

But then the British quartet of Asha Philip, Desiree Henry, Dina Asher-Smith and Daryll Neita went one better than their bronze at the Rio Olympics a year ago to take a brilliant silver behind the USA in 42.12 seconds, Jamaica with bronze as that country's disappointing World Championships continued.

The host nation had only Farah's 10,000m gold to show for the first eight days of competition, the mood reflective rather than celebratory as the team racked up five fourth places.

In the space of 15 minutes, that mood was transformed.

Britain's men had looked smooth in qualification on Saturday morning, and they then produced their best to shock the American favourites and light up the London Stadium.

Ujah got out of the blocks brilliantly, his reaction time to the gun of 0.124 secs the best in the field, before Gemili - who only a few weeks ago at the national trials looked a shadow of the athlete who finished fourth over 200m in Rio - powered down the back straight.

With each baton change exemplary, Talbot backed up the personal best he ran in the individual 200m with a fine bend, before Mitchell-Blake held his nerve and form to keep 100m silver medallist Christian Coleman at bay.

Not since GB's team won gold at the Athens Olympics 13 years ago have they delivered in such glorious style, the display a vindication for both the practice the team have put in and the closeness between the individual components.

'We are world champs!'

CJ Ujah: "I am proud of these guys and those behind the scenes. It is crazy to do this in London. I can't even talk right now."

Adam Gemili: "We are world champs. To run it with Danny Talbot after such disappointment in London 2012, it is so special to come back. Thank you to everyone. It's crazy. Honestly a dream and a reality tonight. Wow."

Danny Talbot: "2012 didn't go our way and we have been working hard since then. It's a massive team effort and we win as a team and lose as a team. We are world champions at home. We will never get this feeling again."

Nethaneel Mitchell-Blake: "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."

Bolt's sorry farewell

Bolt (fourth from right) ended his solo track career with bronze in the individual 100m

Jamaica had been in third when Bolt took the baton, and the Usain of old would have believed he could have chased his rivals down.

But in his valedictory season, the three-time Olympic 100m and 200m champion is no longer the force he was, even as his draw remains undimmed.

And 50 metres down the straight, he grimaced and pulled up before collapsing into his lane, his fall lost in the bedlam for the British triumph.

Few had seen the greatest career in athletics history ending like this, and Bolt must now regret not stepping away after his three golds in Rio.

Along with Farah, he has been the untouchable, unbeaten star of the past decade, but the mantle - and the baton - has now passed to the next generation.

The time of 37.47 seconds by the British team was also a European record

Analysis - GB beat everyone fair and square

Eight-time world champion Michael Johnson on BBC One

This wasn't a win where the USA dropped the baton or Jamaica ran out of the zone - Great Britain beat everyone fair and square. That was an amazing performance in front of a crowd that has been wanting a gold medal.

They delivered it on a night where everyone was here maybe not necessarily to see this - but it is an amazing story for a team who worked really hard.

Adam Gemili was just ridiculous down the back stretch. He opened such up a gap that was always going to be hard for anyone to chase down.

This is a special gift to this crowd and for those guys to go out there and put on a performance like that is fantastic. They deserve this.

Britain claimed three medals on Saturday to move up to fourth in the medal table

We smashed it - GB women

Neita, who held off Jamaica by 0.07 on the anchor leg to take silver in the women's 4x100m relay, said: "We smashed it. We worked so hard for this.

"I tried my best down that last stretch and I'm glad to bring the team home to silver. We work so hard as a team so we are delighted."

Dina Asher-Smith, who finished an agonising fourth over 200m after an injury-hit season, added: "To upgrade from Olympic bronze to world silver with these girls has been absolutely incredible, and to do it at home means so much."