Italian rider Stefano Oldani grabbed his maiden professional career victory after winning stage 12 of the Giro d'Italia, a 186-kilometre ride from Parma to Genoa, the longest stage of the race.

Italian duo Oldani and Lorenzo Rota, alongside Dutchman Gijs Leemreize, all of whom had never won a WorldTour event before, pulled clear of the chasing pack on the third of three category three climbs on the stage.

Unchallenged, the trio sized each other up as the stage reached the streets of Genoa, with Leemreize making his move first, before Oldani had too much power, taking the win for his team Alpecin–Fenix ahead of Rota in second.

"It wasn't so easy to manage the race, but it looks like I managed it," Oldani told Eurosport.

"I know Lorenzo (Rota) well and knew he would be fast, but I had just enough to do it.

"I worked really, really hard for this. It seems like magic that I've done it."

Spaniard Juan Pedro Lopez, who spent his eighth day in the pink jersey, struggled early on, but fought back to lead the peloton home, ensuring he stayed top of the general classification.

Friday's stage 13 of the Giro is a 157-kilometre ride from Sanremo to Cuneo.