Peter Sagan became the first rider since 2007 to retain his world championship road race title when he perfectly timed his sprint in Doha.
The Slovakian, who has won seven Tour de France stages as well as the points classification five times in a row, was on the right side of an early split of the peloton and kept a low profile until the final straight.
New Zealand riders Jack Bauer and Dion Smith both failed to finish the race after getting caught too far back in the pack.
With only two team mates to help him, while the biggest cycling nations have nine-man teams, Sagan became the first road race rider to retain his rainbow jersey since Italian Paulo Bettini nine years ago.
"I don't believe, I'm still in shock. I'm very happy because when the split happened, I was the last rider to make it in the first group," said Sagan after the 257-km race.
The decisive moment happened around 180km from the finish line when crosswinds split the bunch and several top riders were trapped behind.
While Britain and Belgium were on the right side of the split, it was not the case for Germany or France.
Germany's Marcel Kittel and Andre Greipel were dropped, as were France's Arnaud Demare and Nacer Bouhanni.
They would never make it back to the front group, which was controlled by the Belgian and Italian teams.
With two kilometres left, Dutchman Tom Leezer attacked and opened a decent gap before being reined in by the Belgians.
Boonen, the 2005 world champion, launched the sprint slightly too early and there was nothing he could do when Sagan powered past after waiting for the right time to make his move.
"There was some headwind so I stayed in (Italian Giacomo) Nizzolo's wheel. He could have closed the door but he did not," said Sagan.
Cavendish, who won the title in 2011, said: "I was blocked behind (Australian Michael) Matthews. I just took what turned out to be the wrong line and couldn't get that crucial gap."
Next year's edition will be held in Bergen, Norway.