Bergen - Slovakia's Peter Sagan pipped Norway's Alexander Kristoff in a photo-finish to win a historic third straight world title in Bergen on Sunday.
Sagan emerged out of the final corner in the perfect position on Kristoff's shoulder and just had enough to edge past the home favourite as Australia's Michael Matthews took third.
After his win, Sagan dedicated his victory to Italian Michele Scarponi, who died in April following a crash with a van near his home in Italy - he would have turned 38 on Monday.
"I want to dedicate this third world title first to Michele Scarponi because he has his birthday tomorrow. I'm very sorry this year, I want to wish luck to his family.
"And secondly I want to dedicate this victory to my wife, she's expecting a baby. It's a very nice finish to this season, I'm very happy."
Sagan had revealed on Saturday that his preparation for the race had been disrupted by "sickness" and that he wasn't at his best.
He had hardly been seen throughout the 267.5km race but was part of the small group that made it to the final kilometre to contest the sprint finish.
And in winning he joined a select group of riders, including Belgian legend Eddy Merckx as three-time world champions, and the first to do so in successive years.
"It's something special, for sure it doesn't change anything, but for me it's something very nice," he added.
Despite the length of the race it was only in the final 15km that a significant break was made that threatened to go all the way to the line.
Frenchman Julian Alaphilippe attacked on the final ascent of Salmon Hill, the one climb on the 19km street circuit the peloton tackled 12 times.
Only Italian Gianni Moscon could follow him but was then dropped with 4.5km left.
Alaphilippe couldn't hold on, though, and coming into the final few bends a select group of 26 riders was there to fight for victory.
Only now did Sagan make his move and Kristoff didn't have the strength to hold him off.
Sagan admitted that he thought Alaphilippe, who looked hugely impressive when he attacked, leaving the likes of Olympic champion Greg Van Avermaet and former world champion Philippe Gilbert in his wake, might stay away.
"It's not easy guys, in the last 5km I said already it's done, he (Alaphilippe) has gone," said Sagan.
"After, guys were changing in front, after I tried to go in a breakaway, after (Fernando) Gaviria tried to close (the gap) and after it came for a sprint - it's unbelievable!"
Despite his disappointment in missing out on becoming the second ever Norwegian world champion, Kristoff flashed Sagan a wry smile as he shook his hand.
"He (Kristoff) is racing at home, I'm sorry but I'm very happy to win again!" said Sagan.
Earlier in the day a 10-man breakaway had set off from the flag but despite quickly building a 10-minute advantage, they had been gobbled up with 80km left.
Another eight-man group with big-hitters including Dutchman Lars Boom and Tim Wellens of Belgium got clear but could never stretch their lead much beyond 30-seconds and they were brought back with 25km to go.
Alaphilippe at one point to have the strength to go the whole way but just as the drama intensified with 3km to go, a technical glitch meant the television cameras lost track of the racers.
By the time they came into the view of stationary cameras in the final kilometre, Alaphilippe had been caught and a sprint finish was a certainty.
At that point, few could have doubted that Sagan would prevail.
Results from the 267.5km men's world championship road race in Bergen, Norway on Sunday:
1. Peter Sagan (SVK) 6hr 28min 11sec, 2. Alexander Kristoff (NOR) same time, 3. Michael Matthews (AUS) s.t., 4. Matteo Trentin (ITA) s.t., 5. Ben Swift (GBR) s.t., 6. Greg Van Avermaet (BEL) s.t., 7. Michael Albasini (SUI) s.t., 8. Fernando Gaviria (COL) s.t., 9. Alexey Lutsenko (KAZ) s.t., 10. Julian Alaphilippe (FRA) s.t. 11. Michal Kwiatkowski (POL) s.t., 12. Soeren Kragh Andersen (DEN) s.t., 13. Tony Gallopin (FRA) s.t., 14. Zdenek Stybar (CZE) s.t., 15. Vasil Kiryienka (BLR) s.t., 16. Viatcheslav Kuznetsov (RUS) s.t., 17. Philippe Gilbert (BEL) s.t., 18. Serguei Chernetckii (RUS) s.t., 19. Rui Costa (POR) s.t., 20. Simon Geschke (GER) s.t.