Canadian Ryder Hesjedal has withdrawn from the Giro d'Italia.

The Garmin-Sharp team said the defending champion pulled out due to a "deteriorating physical condition."

The Victoria native, who was more than 32 minutes behind in 38th-place overall, called the decision "heartbreaking."

Tour de France champion Bradley Wiggins also withdrew on the advice of the team physician due to "a worsening chest infection."

Nibali retains lead

Mark Cavendish sprinted to victory in the 13th and longest stage of the Giro d'Italia on Friday, and favourite Vincenzo Nibali retained the overall lead to boost his chances of a first victory in his home country's Grand Tour.

Cavendish won in a time of 6 hours, 9 minutes, 55 seconds to claim a second straight stage victory and a fourth in this year's Giro.

Giacomo Nizzolo was second, with Luka Mezgec third in a bunch sprint at the end of the 254-kilometre (158-mile) leg from Busseto to Cherasco.

Nibali maintained his 41 second lead over Cadel Evans. The mountain stages are coming up soon in the race.

Hesjedal became the first Canadian to win a Grand Tour race last year.

He has been struggling in this year's race since the Stage-8 time trial.

"I want to be here for my team and for all the people who have supported me to get me here to this point," Hesjedal said. "I built my entire season around the Giro and I came here feeling great, but I have been suffering since the TT.

"We're working on it, but we're not sure what's wrong.

"There's a virus that's been going around, so it could be that, or severe allergies, or going too deep on the TT combined with both.

"Whatever it is, I'm only getting worse," Hesjedal added. "Yesterday's stage was just too much for me. I fought to get through it and I know everyone suffered, but after seeing the medical staff last night, I also know that it's time for me to go home, get some tests done and get healthy again."

'Chest infection has been getting worse'

Team Sky says Wiggins' condition has been getting worse.

"We monitored Bradley overnight and, this morning, we've withdrawn him from the Giro after consulting the team doctor," Team Sky general manager Dave Brailsford said. "His chest infection has been getting worse and our primary concern is always the health of our riders.

"Bradley will return to the UK today for treatment and to rest and we hope to have him back on the road as soon as possible."

Wiggins struggled throughout the Giro, both on rainy descents and on steep climbs. He lost more than three minutes in Thursday's rainy stage and left the race in 13th place, 5:22 behind overall leader Vincenzo Nibali.

"As a passionate racer, he wanted to continue but he is simply unable to do so on medical grounds," Brailsford said.

Sky still has Colombian rider Rigoberto Uran in third place overall, 2:04 behind Nibali, who holds a 41-second lead over 2011 Tour winner Cadel Evans.

Wiggins is expected to help teammate Chris Froome at the Tour this year but he said before leaving for Italy that he might grab the team leadership in France himself and try to defend his title. That prompted Sky to issue a statement saying that Froome will be the team leader for the French race.

In last year's Tour, Froome finished runner-up to Wiggins.

Stage 13 Friday is the race's longest, a mostly flat 254-kilometre leg from Busseto to Cherasco, with a few hills shortly before the finish.

The race hits the mountains again over the weekend, with Saturday's stage climbing Sestriere and Bardonecchia and Sunday taking riders into France and up the Col du Galibier, which is often included in the Tour.

The race ends May 26 in Brescia.