Cavendish is using the race to prepare for this summer's Olympics
Mark Cavendish became the first British rider to win two stages at the Giro d'Italia after taking the honours in a sprint finish on day 13.
Cavendish finished the 177km (110 miles) route in four hours, 11 minutes and seven seconds to edge Daniele Bennati into second place.
"I promised my team mates I'd win and we did a perfect sprint," he said.
Meanwhile, Giovanni Visconti maintained his lead in the overall standings for the eighth day in a row.
Cavendish also won the fourth stage earlier this month.
The 23-year-old Briton was quick in gaining revenge on Bennati, after losing out to the Italian in a photo-finish - with just a 3cm gap between the two riders - after a hard-fought sprint in stage 12 on Thursday.
The Isle of Man rider had too much power and pure speed in the closing 200m as he left his rivals trailing and he even had time to check over his shoulder in the final few metres.
"I have to say a massive thanks to Bennati," added Cavendish.
"He showed great sportsmanship by letting me through the gap. That meant we could fairly contest the sprint and show who was the fastest."
"I probably would have closed the gap in the same situation but I hope to pay him back some time in the future for his kindness."
Spain's Koldo Fernandez finished in third place, with German veteran Erik Zabel in fourth.
Cavendish is only the third British rider, along with Robert Millar in 1987 and Vin Denson in 1966, to win any stage in the Giro.
The 14th stage gets under way on Saturday with a 195km (121 miles) mountain stage from Verona to Alpe di Pampeago.
Stage 13 results:
1. Mark Cavendish (GB/THR) 4hr 11min 07sec
2. Daniele Bennati (Ita/LIQ) same time
3. Koldo Fernandez (Spa/EUS)
4. Erik Zabel (Ger/MRM)
5. Julian Dean (NZ/TSL)
6. Mirco Lorenzetto (Ita/LAM)
7. Alexandre Usov (Blr/A2R)
8. Nikolai Trussov (Rus/TCS)
9. Robbie McEwen (Aus/SIL)
10. Graeme Brown (Aus/PAN)
1. Giovanni Visconti (Italy) 57 hours, 17 minutes, 6 seconds
2. Gabriele Bosisio (Italy) 5 minutes, 50 seconds behind
3. Alberto Contador (Spain) 6:59 behind
4. Andreas Kloden (Germany) 7:41
5. Vincenzo Nibali (Italy) 7:51
6. Marzio Bruseghin (Italy) 7:52
7. Paolo Savoldelli (Italy) 7:56
8. Danilo Di Luca (Italy) 8:20
9. Gustav Erik Larsson (Sweden) 8:31
10. Riccardo Ricco (Italy) 8:32.