Francisco Ventoso profited from a crash involving Mark Cavendish in the final corner to take the ninth stage of the Giro d'Italia.
Cavendish and sprint rival Matthew Goss were among the leaders who ran wide before being involved in a pile-up at the last bend, less than half a kilometre from the finish line.
That allowed Movistar rider Ventoso to go through and win the 166km stage from San Giorgio nel Sannio to Frosinone in a time of three hours, 39 minutes and 15 seconds.
The Spaniard managed to hold off the advances of Italian duo Fabio Felline (Androni Giocatolli) and Giacomo Nizzolo (RadioShack), who finished second and third respectively.
Ryder Hesjedal managed to avoid any slip-ups to cross the line in a group and retain the pink jersey and his overall nine-second lead over Joaquin Rodriguez.
Thirty-year-old Ventoso claimed his second Giro stage win after triumphing in nearby Fiuggi last year.
"In the early sprints I found it tough to stay up at the front, because the peloton is very compact and the risks are greater," he said.
"However, after a week, when the first one has been so tough as it has been in this Giro, things change.
"Realising this, I decided to save my energy for the second week.
"In the final sprint I wasn't in a very good position but when the crash occurred I saw that I could benefit from it and I launched my effort."