Peter Sagan stayed quiet all day before timing his effort to perfection in the final sprint to become the first rider to claim three road race world championship titles in a row.
The Slovakian surged ahead with less than 50 metres left when he pipped local favourite Alexander Kristoff to the line.
Australian Michael Matthews took third place after being boxed in during the lead-up to the sprint.
“It was not easy. It came down to a sprint, that was unbelievable,” Sagan said.
“I’m sorry (for the Norwegian fans) but I’m happy to be world champion again.”
It seemed that France’s Julian Alaphilippe and Italian Gianni Moscon would fight it out for gold when both jumped away from the leading group 11km from the line on the ascent to Salmon Hill, a 1.4-km effort at an average gradient of 6.4 per cent.
But they were eventually reined in and most of the top sprinters contested the win.
Sagan, who was kicked out of the Tour de France this year for sending Mark Cavendish crashing in a sprint, was clearly the strongest as he added to his titles in Doha and Richmond, Virginia.
Tim Wellens broke away with 70km left and was followed by seven riders — Spain’s David De La Cruz, Dutch Lars Boom, Italian Alessandro De Marchi, Colombian Jarlinson Pantano, Austrian Maro Haller, Australian Jack Haig and Norway’s Odd Christian Eiking.
They built up a maximum gap of 45 seconds as France tried to take control at the front of the peloton.
The break was ended 25 km from the finish after the peloton was split in the penultimate passage up to Salmon Hill.
In the final ascent, Alaphilippe burst away from the leading pack and only Moscon could follow as they opened up a 10-second gap.
They came up just short, though. The Frenchman contested the sprint but ended up 10th.