MUR-DE-BRETAGNE, France - Cadel Evans edged defending champion Alberto Contador in a photo finish Tuesday to win the fourth stage of the Tour de France, and Thor Hushovd retained the overall lead.

The mostly flat 172.5-kilometre course from Lorient to Mur-de-Bretagne with a short, steep uphill finish epitomized two race aspects so far: Evans has been nearly flawless, and Contador -- who hasn't -- can never be ruled out.

The nail-biting finale was so close that Contador raised a fist to celebrate what the three-time Tour champ believed was his victory, but a photograph at the line showed Evans, an Australian two-time runner-up, had won.

Still, the ride left little doubt that Contador, who has faced a series of early setbacks already, is in shape to compete. With his second-place finish, he regained several seconds against other some likely title contenders.

"I still can't quite believe it ... It was a very close final, I didn't even know if I had it on the line myself," Evans said. "To win in front of Alberto Contador is really a nice present."

But the Spaniard's strong finish demonstrated "Contador again proving himself. He was up there and riding well," Evans said. "He's never a guy you can underestimate."

Victoria's Ryder Hesjedal finished in a tie for 19th place, eight seconds back. The Garmin-Cervelo rider rose 23 positions to 34th place in the overall standings, 1:22 off the lead.

It was the first in-competition Tour stage win for Evans in seven appearances, though he inherited a stage victory in 2007 after Alexandre Vinokourov was barred in a team doping scandal. It was also the first Tour stage victory for an Australian since Simon Gerrans won Stage 15 finishing at Italy's Prato Nevoso in 2008.

Hushovd, the Norwegian world champion and known mainly as a sprint specialist, narrowly kept the race leader's yellow jersey by trailing not far behind in a small breakaway group.

"My only goal today was to keep the yellow jersey," said Hushovd, of Garmin-Cervelo. "I had a great day ... I will do all I can to defend this jersey as long as possible."

Evans clocked four hours 11 minutes 39 seconds -- the same time as Contador, third-place Vinokourov and Hushovd, who came sixth. Overall, Hushovd held on to a one-second lead over Evans.

Frank Schleck of Luxembourg rose to third place from seventh by staying with the seven-man group, including Evans and Contador, though he didn't gain any time on Hushovd and is four seconds back overall.

Contador remains 1:42 behind Hushovd in 41st place after two dismal opening days at the Tour, first being stalled by a crash on Saturday and then losing time with his Saxo Bank squad in the team time trial on Sunday.

But the Spaniard finished Tuesday eight seconds faster than possibly his biggest overall rival -- Andy Schleck, Frank's younger brother and the Tour runner-up for the past two years.

It was a message not lost on Andy Schleck.

"Losing seven seconds (sic) (to Contador) isn't good, but it's not a catastrophe," he said. "I never thought that he was out of the race; he just had bad luck the first day and his team wasn't suited for the time trial."

Evans' stage victory capped what has so far been a nearly impeccable Tour for him. His BMC team fared well in the time trial, and he has avoided the many crashes that have entangled both Contador and Andy Schleck.

With fewer than 20 kilometres left Tuesday, Evans ran into trouble with his chain and had to stop briefly with a team car, before getting an escort from teammates to catch the pack.

The stage result was likely to be a disappointment for Omega Pharma-Lotto rider Philippe Gilbert, who turned 29 on Tuesday and was the favourite to win because of his prowess on course layouts like the fourth stage.

Earlier, Jurgen Van de Walle of Belgium became the first rider to pull out of the race -- reducing the field to 197 racers. The Omega Pharma-Lotto rider quit due to lingering groin pain from a crash Saturday, the team said.

Riders set off under rain in the coastal city of Lorient, whose name is derived from the 17th century shipyards and port for trading ships that hauled back spices, teas, silk, porcelain and other goods from Asia, or "The Orient."

Seemingly the whole pack began the ride in rain jackets, but gradually peeled them off as skies dried up. The roads were mostly wet, though there were some dry patches on the weaving course.

Five riders who were low in the standings sped ahead of the pack by the nine-kilometre mark, and built a lead of nearly five minutes on the main bunch over the next 15 kilometres.

But as is common in flat rides, when the pack accelerates behind constantly changing front men who cut into the wind, the peloton tracked down and overtook the increasingly tired escapees with 4 kilometres left.

That set the stage for the leaders to break out alone to scale the Mur-de-Bretagne, a two-kilometre climb with a super-steep patch known by some as the "Alpe d'Huez of Brittany" after the famous peak in the French Alps.