LE CAP D'AGDE, France (AP) -- Andre Greipel of Germany led a photo-finish sprint to win the 13th stage of the Tour de France on Saturday, while Britain's Bradley Wiggins retained the overall leader's yellow jersey as the race headed south to the Mediterranean.

The windy and flat 134.8-mile run with one major climb from Saint-Paul-Trois-Chateaux to Le Cap d'Agde was tailored for a win by one of the race's sprinters.

Greipel, who turns 30 on Monday, earned his third stage victory of this year's Tour after winning the fourth and fifth stages in sprint finishes. Still-photo imagery showed that he won by half a wheel's length ahead of Slovakian rider Peter Sagan.

Edvald Boasson Hagen of Norway was third.

Wiggins trailed close behind in the main pack. Overall, he leads his second-place Sky teammate - and fellow Briton - Christopher Froome by 2 minutes and 5 seconds. Vincenzo Nibali of Italy is third, 2:23 back, and defending champion Cadel Evans of Australia is 3:19 off the pace in fourth.

Saturday's route was known as a transitional stage because it was mostly flat, and guided riders away from their last big test - the Alps - and toward their next, the Pyrenees.

Greipel's Lotto Belisol team did the hard work of leading the pack through a wind-swept ride along the shore in pursuit of breakaway riders Michael Albasini and Alexandre Vinokourov, ultimately catching them.

In a bold move, with less than a mile left, Wiggins powered up to the front of the pack with Sky teammate Boasson Hagen on his back wheel, trying to set up the Norwegian for the stage win.

Greipel said he "speculated" that such a plot was being hatched. He pulled up just behind Hagen, then whizzed around him after a final bend and held on to the line.

"I'm really happy with this victory ... it was once again a team effort," said Greipel, who has four career Tour stage wins. "The sprint was very long. I was just on the wheel of Boasson Hagen, and I saw that I could win if I just gave a little extra at the end."

As the riders neared the coast, the stage's big challenges arrived. There was a steep if short climb in the port town of Sete, and a windy ride between the Mediterranean and the Bassin de Thau - known for its oyster farms.

Riders swung their bikes left to right as if in slow motion as they hit the Mont Saint-Clair climb in Sete, a mid-grade ascent of about a mile - but with an average gradient of 10.2 percent.

Evans attacked on the Mont Saint-Clair and got a few seconds ahead of Wiggins. But the Briton and his other closest rivals for the yellow jersey all hung close on the Australian's back wheel.

Sunday's 14th stage takes riders along two big climbs over a 118-mile trek from Limoux to Foix.

SI Apps
We've Got Apps Too
Get expert analysis, unrivaled access, and the award-winning storytelling only SI can provide - from Peter King, Tom Verducci, Lee Jenkins, Seth Davis, and more - delivered straight to you, along with up-to-the-minute news and live scores.