Cesare Benedetti won the 12th stage of the Giro d'Italia on Thursday for his first victory as a professional while Jan Polanc took the overall leader's pink jersey from UAE Emirates teammate Valerio Conti.

Benedetti, an Italian with the Bora team who has been a support rider for his entire career, was part of an early breakaway then accelerated from a select group of riders in a sprint finish.

"I've worked a lot for the others in the past but today I got my opportunity," Benedetti said. "I'm not (usually) a winner."

Italy's Vincenzo Nibali, center, pedals during the 12th stage of the Giro d'Italia, tour of Italy cycling race, from Cuneo to Pinerolo, Thursday, May 23, 2019. (Alessandro Di MeoANSA via AP)

Italy's Vincenzo Nibali, center, pedals during the 12th stage of the Giro d'Italia, tour of Italy cycling race, from Cuneo to Pinerolo, Thursday, May 23, 2019. (Alessandro Di MeoANSA via AP)

Benedetti required 3 hours, 41 minutes to complete the 158-kilometer (98-mile) leg from Cuneo to Pinerolo, which featured one major climb and another shorter but steeper ascent just before the finish.

Damiano Caruso crossed second and Eddie Dunbar came third, each with the same time as Benedetti. Polanc, a Slovenian who was also in the breakaway, finished 25 seconds behind.

In the overall standings, Polanc leads Primoz Roglic by 4 minutes, 7 seconds. Vincenzo Nibali, one of the pre-race favorites, is fifth overall, 5:51 behind.

Cyclists pedal during the 12th stage of the Giro d'Italia, tour of Italy cycling race, from Cuneo to Pinerolo, Thursday, May 23, 2019. (Alessandro Di MeoANSA via AP)

Cyclists pedal during the 12th stage of the Giro d'Italia, tour of Italy cycling race, from Cuneo to Pinerolo, Thursday, May 23, 2019. (Alessandro Di MeoANSA via AP)

"It was a team tactic that I would go in the breakaway so we could have a better control over the race," Polanc said. "It was also a way to keep the pink jersey in the team."

Mikel Landa and Miguel Angel Lopez attacked on the first-category climb to Montoso and gained about 30 seconds on the other overall favorites.

Before the stage began, sprinters Caleb Ewan and Elia Viviani withdrew from the race. Ewan won two stages, including the 11th leg a day earlier, while Viviani posted three second-place finishes.

Stage 13 on Friday is one of the race's toughest, with two category one climbs and one category ascent, along with an uphill finish at the end of the 196-kilometer leg from Pinerolo to Ceresole Reale.

The Giro ends June 2 in Verona.

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports