BERGEN, Norway — Peter Sagan ended a year of mixed fortunes on a high note by becoming the first man to win three straight world road race titles.

The colorful rider from Slovakia defended his crown on Sunday after holding off Norwegian Alexander Kristoff in a sprint finish at the road world championships in Norway.

Sagan was unnoticed during most of the 267.5-kilometer (166-mile) race. He perfectly timed his final effort, powering to the front in the final straight. Australia’s Michael Matthews was third.

Frenchman Julian Alaphilippe tried to go for a solo win in the final 10 kilometers after a sudden acceleration on the final climb of Salmon Hill. He was joined by Gianni Moscon of Italy but the pair was ultimately reined in.

Sagan said he thought until the final kilometers that the breakaway riders would not be caught by the bunch.

“In the end, it came to a sprint and it was unbelievable,” Sagan said. “Kristoff is racing at home, and I’m sorry for that, but I’m happy to win again.”

Sagan became the fifth rider in history to win three road world titles, joining Alfredo Binda, Rik Van Steenbergen, Eddy Merckx and Oscar Freire. It’s unlikely that he will compete for a fourth consecutive title next year in Austria as the course in Innsbruck will be suited to climbers.

“I want to dedicate this to Michele Scarponi,” said Sagan, referring to the former Giro d’Italia winner who died in a training accident earlier this year. “Because he would have had a birthday tomorrow. It was a very sad story this year.”

Sagan, who was excluded from the Tour de France in July for elbowing British rival Mark Cavendish during a sprint, also dedicated his win to his wife. The crash forced Cavendish to abandon the race with a broken shoulder.

“We are expecting a baby,” Sagan said. “It’s a very nice end of the season.”