Sir Chris Hoy won the men's keirin world title with a phenomenal last-ditch move in the home straight at the World Track Cycling in Melbourne.
Hoy crowbarred his way between New Zealand's Simon van Velthooven and eventual silver medallist Maximilian Levy of Germany to grab the gold medal.
The electrifying victory installs Hoy as the clear favourite for the Olympic gold, while Jason Kenny won bronze.
The British team end the Worlds on top of the medal table for Olympic events.
From the 10 events which make up the programme for London 2012, British riders took five gold medals to second-placed Australia's three.
Wendy Houvenaghel added silver in the individual pursuit, Geraint Thomas combined with Ben Swift for madison silver, and Jess Varnish won bronze in the women's 500m time trial. None are Olympic races but all four riders are in contention for Olympic selection.
"If this is my last World Championships, and it might be, then what a way to finish," Hoy told BBC Sport.
While he has long been acknowledged as a master of the keirin, rarely has even the 36-year-old - last year's world silver medallist - produced such a breathtaking finale.
Boxed in as the six finalists reached the final corner, Hoy swooped down off the banking to take a daring inside line, carving out space between the Kiwi and German riders before reaching the line fractionally ahead of Levy.
Hoy has suffered a disappointing week elsewhere, being disqualified from the team sprint and settling for individual sprint bronze behind Kenny, but he now leaves Australia as a world champion in Olympic year.
"I'd given up - not physically, but I thought the chance of winning had gone by the time I hit the back straight with half a lap to go," said Hoy.
"Normally I'd go around the outside and put my foot down but I'd lost momentum. It was one last chance - I've never gone up the inside before in my life, it's a real last-chance saloon - I couldn't believe the door opened and I managed to get through. In some ways I'm very lucky, but very grateful to have won.
"World titles are all special, every single one you remember, but this is particularly special because it's the last meaningful race I'll have before the Olympic Games. It's a great confidence boost and hopefully I'm showing my rivals I can win from any position."
Kenny initially finished fourth but the relegation of Van Velthooven promoted him to the podium.
Elsewhere, silver for Houvenaghel inside Melbourne's Hisense Arena is some consolation after she was overlooked for the team pursuit, which is an Olympic race and in which Britain both won gold and set a world record on Thursday.
The 37-year-old won individual pursuit silver behind Rebecca Romero at Beijing 2008 but the event was subsequently dropped from the Olympic programme, leaving the team pursuit her only hope for London 2012.
"Earlier this week I was in two minds whether to do the individual pursuit or not because of the situation that occurred on Thursday [when she was not picked for the team pursuit]," Houvenaghel told BBC Sport.
"I've trained so hard with the others and the result the girls got on Thursday was absolutely phenomenal. I would have loved to be part of that but unfortunately didn't get the chance. [Now] I'm a little bit less frustrated.
"It's not over yet, I'm very much in the hunt [for Olympic selection]. I won't be stepping aside or making it easy for any of the others."
Anna Meares set a new world record of 33.010 seconds in the time trial to win gold for Australia. Varnish finished almost a second back in third place despite clocking her own personal best of 33.999.
Team pursuit world champion Thomas and scratch race gold medallist Swift concluded Britain's involvement at the World Championships in the men's madison, finishing second with 18 points to victorious Belgium's 24.
Swift has won a gold and two silver medals, all in non-Olympic events, as he fights to join Thomas in the team pursuit for London 2012.
The squad for the Olympics is set to be announced in June but it is possible that the precise GB line-up for individual events may not be made public until the Games are under way.