Olympic road champion Greg Van Avermaet overtook Zdenek Stybar just before the line in a thrilling sprint finish to win the Paris-Roubaix classic for the first time on Sunday.

With five riders in contention on the final lap entering the velodrome in Roubaix, Stybar launched a blistering attack. But the Belgian rider countered it brilliantly, going on the outside of the Czech rider and streaking past him in the last 10 meters. Dutchman Sebastian Langeveld finished third.

Van Avermaet screamed with joy, while Stybar thumped his handlebar in frustration. After dismounting, Van Avermaet rushed over to hug his BMC teammate Daniel Oss of Italy, who had ridden hard in front to put him in a winning position.

Van Avermaet beat rival Zdenek Stybar to the line (Getty)

"It feels really good. I suffered a lot, but when you win you forget everything. I was just really strong in the end," Van Avermaet said. "This race is right up there among the classics. After many years, I've managed to win it."

It was even more satisfying for Van Avermaet considering he lost nearly one minute after crashing earlier in the race.

The race is known as the "Hell of the North" for the numerous cobblestone sections along the 257-kilometer (159.3-mile) trek to Roubaix in northern France.

About 100 kilometers from the end Van Avermaet fell on one of them, shouting for a new bike as he clutched his left shoulder.

The Belgian's win was particularly impressive given that he crashed early on (Getty)

Van Avermaet, who recovered from a fall last Sunday to finish second at the Tour of Flanders, frantically caught back up while Tom Boonen continued to attack from the front of the peloton, chasing down the three breakaway riders.

Boonen, racing for the final time in a glittering classics career, led the peloton into the famed Trouee d'Arenberg — a notoriously difficult cobble section stretching for 2 kilometers (1.24 kilometers) — although dry conditions spared riders the risk of treacherous slips.

Trying to break free of the peloton, Boonen attacked again with 70 kilometers to go, with world champion Peter Sagan of Slovakia on his wheel.

Sagan (L) was in contention throughout (Getty)

Up ahead, the three breakaway riders were now two — with Jasper Stuyven of Belgium and Oss about 30 seconds ahead.

Stuyven soon dropped back, while Oss was joined by six other riders — including Van Avermaet —to form a small leading group.

Sagan lost some valuable time to repair a puncture, while Boonen lagged behind and finished the race in 13th.

The race is one of the most famous Monuments in the cycling calendar (Getty)

Van Avermaet continues his great form this season. He recently won the Gent-Wevelgem and E3 Harelbeke classics, adding to his victory last month in Het Nieuwsblad.

The 31-year-old Van Avermaet is at his peak, while Boonen ends his career falling short of a record fifth win at Paris-Roubaix.