Wiggins finished ninth in the race last year

Britain's Sir Bradley Wiggins failed in his bid to win the prestigious Paris-Roubaix one-day race as Germany's John Degenkolb sprinted to victory.

Wiggins finished 18th, in a bunch 31 seconds behind Degenkolb after a 151-mile race across northern France.

Riding in his final race for Team Sky, the Olympic and World time-trial champion tried to race clear 20 miles from the finish but he was caught.

Degenkolb won a six-man sprint in Roubaix's open-air velodrome.

"It is the race I've always dreamed of winning," said the Giant-Alpecin rider after becoming the first man since Ireland's Sean Kelly in 1986 to win the Milan-San Remo and Paris-Roubaix classics in the same year.

"This is unbelievable. My team was there all day to hold the situation under control until I could start. I was not afraid to fail and that was the key."

Despite failing to match the ninth-place finish he managed last year in the race last year, Wiggins was content with his final day in Team Sky colours.

"I am pretty happy. I didn't have one puncture, one crash, I was just pleased to come through it," he said.

John Degenkolb becomes the second German to win the race after Josef Fischer won the first edition in 1896

"I was trying not to think about it, but there were so many people coming up to me in the race saying 'have a nice life' and stuff.

"It was really nice that all these guys that you have been bashing heads with through the years coming up to congratulate you on your career.

"I just kissed [Team Sky team principal] Dave on the forehead, told him we've gone through a lot together."

No British rider has ever won the notoriously tough race, which features 27 sections of cobbled roads and Wiggins had made it his big target for this season before leaving Team Sky to set up his own team.

It was a fitting finale for Wiggins, who was among the first riders to join Team Sky for its inaugural season in 2010.

The 34-year-old, who became the first Briton to win the Tour de France, in 2012, and also won the 2013 Tour of Britain, to add to his time-trial victories, was in contention in the closing stages.

He broke clear of the main bunch of riders on a cobbled section and formed an alliance with Stijn Vandenbergh and Zdenek Stybar of Etixx-Quick-Step and Jens Debusschere of Lotto Soudal.

However, the quartet was deemed too dangerous to be allowed to stay clear by the rest of the peloton which worked hard to catch them.

Analysis, Former British champion and Olympic track medallist Rob Hayles "However much effort you have made in a race, if you have a sprint, you can find it when it is needed. John Degenkolb was by far the quickest rider out of that final group and made it count on the final quarter of a lap. Once he went, he took three or four bike lengths out of everyone else. "Hats off to Bradley Wiggins for the way that he rode. There was a lot of hype and talk about him winning this race. He attacked hard and often in the last few kilometres and it could have been a very different race had he had team-mates Ian Stannard and Geraint Thomas around him, as well as Luke Rowe, in the latter stages."

Several attacks followed in the closing stages before Belgian duo Greg van Avermaet, who rides for BMC, and Etixx-Quick-Step's Yves Lampaert broke free and were joined by Degenkolb.

The trio did not work well together though, with the Belgians fearing Degenkolb's sprint, and they were caught by several other riders before they entered the velodrome.

Degenkolb then kicked in on the final bend and raced clear to win from Stybar and Van Avermaet.

Luke Rowe, a Team Sky team-mate of Wiggins, was the first Briton home in eighth, 28 seconds behind the winner.

Geraint Thomas, who was Sky's other main rider, had a torrid day with a couple of early punctures before clipping a kerb and crashing.

Fellow Briton Adam Blythe had been among a nine-strong breakaway group early in the race, which was briefly thrown into chaos when a level-crossing barrier came down.

Several riders, against the race rules, rode around the gates before a policeman stepped in to stop them, seconds before a TGV rumbled past.

Paris-Roubaix result:

1. John Degenkolb (Ger/Giant) 5hrs 49mins 51 secs

2. Zdenek Stybar (Cze/Etixx-Quick-Step) Same time

3. Greg Van Avermaet (Bel/BMC Racing)

4. Lars Boom (Ned/Astana)

5. Martin Elmiger (Swi/IAM Cycling)

6. Jens Keukeleire (Bel/Orica)

7. Yves Lampaert (Bel/Etixx - Quick-Step) +7secs

8. Luke Rowe (GB/Team Sky) +28secs

9. Jens Debusschere (Bel/Lotto) +29secs

10. Alexander Kristoff (Nor/Katusha) +31secs

In 2006 three riders were disqualified from the race for going through a closed level crossing