Mads Pedersen won the men's elite race at the Road World Championships on Sunday in a surprise victory amid heavy rain in northern England.

The 23-year-old Dane beat Matteo Trentin and Stefan Kung as the race — 261 kilometres (162 miles) in the cold and wet Yorkshire Dales — came down to a much-reduced sprint on Parliament Street.

Trentin was first to open up as they came past Bettys Cafe Tea Rooms but the Italian soon realized he had gone too soon as Pedersen swept past him to win by a comfortable margin.

Slovakia's Peter Sagan at the start of the men race from Leeds to Harrogate, England, at the road cycling World Championships, Sunday, Sept. 29, 2019. (Bradley CollyerPA via AP)

Slovakia's Peter Sagan at the start of the men race from Leeds to Harrogate, England, at the road cycling World Championships, Sunday, Sept. 29, 2019. (Bradley CollyerPA via AP)

Dutch cyclist Annemiek van Vleuten rode alone for more than 100 kilometers to win the women's elite race on Saturday.

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports

Spectators follow the men elite race, at the road cycling World Championships in Harrogate, England, Sunday, Sept. 29, 2019. (AP PhotoManu Fernandez)

Spectators follow the men elite race, at the road cycling World Championships in Harrogate, England, Sunday, Sept. 29, 2019. (AP PhotoManu Fernandez)

Cyclists ride under pouring rain during the men elite race, at the road cycling World Championships in Harrogate, England, Sunday, Sept. 29, 2019. (AP PhotoManu Fernandez)

Cyclists ride under pouring rain during the men elite race, at the road cycling World Championships in Harrogate, England, Sunday, Sept. 29, 2019. (AP PhotoManu Fernandez)