Alberto Contador made it through today’s Stage 7 of the Giro d’Italia and retains the race lead, despite dislocating his shoulder yesterday. Diego Ulissi of Lampre Merida – back in late March from a nine-monh doping ban – won the sprint in Grosseto. Movistar's Juan Lobato was second, with Orica-GreenEdge's Simon Gerrans third.

Ulissi's ban came after he tested positive for an excessive amount of the anti-asthma drug salbutamol from a sample taken during last year's Giro, where he won two stages.

But the Swiss federation – the Italian is based in Switzerland and races under a Swiss licence – found no deliberate intention to dope on his part, and he was allowed to keep those wins.

Today, he took his career haul to three Giro stage victories as he rode strongly in the finale following a good leadout from his team mates on what was a tough uphill drag to the finish.

Following his victory, he said: "There are some big sprinters here, so I knew I wasn't the number 1 favourite today, but I had great legs.

"I went early because I was afraid of getting caught from behind.

"This is a special win for me after the difficult year I've had, and I want to thank my family – my wife, my parents and my in-laws – and also my friends for all their support."

At 264km, today’s stage from Grosseto, which took the peloton from Tuscany to Lazio, passing the eastern edge of Rome on its way to the finish, was the longest of the race. What’s more, it was ridden into a headwind.

Following the crash in which he dislocated his left shoulder yesterday Contador’s Tinkoff-Saxo colleagues did their best to support him, including sheltering him from the wind.

But the Spaniard still looked uncomfortable at times on a long day in the saddle, the stage taking more than 7 hours to complete.

Today’s break was swept up on the penultimate climb of a day played out on rolling roads, with an uphill drag to the finish favouring the stronger sprinters.

With Tinkoff-Saxo setting a strong pace at the head of the peloton towards the conclusion of the stage, a number of riders were tailed off, but in the closing three kilometres it was Team Sky who now moved to the front.

At 1.5km to go, it was Orica-GreenEdge and Lotto Belisol, with yesterday's stage winner Andre Greipel, who moved forward, but they joined in the final kilometre by Lampre-Merida who set up Ulissi for the win.

Griepel lost contact in the closing kilometre, meaning the red points jersey goes back to Team Sky's Elia Viviani, who picked up 4 points at intermediate sprints today.

After the stage, Contador said: "It was a hard day for me but I'm happy because I got through it.

"After three and a half or four hours, I didn't know what to do with my arm, but I hope and trust that, as the days past, it will improve.

"Tomorrow is a stage that I was looking forward too. Now it's going to be hard for me, and I expect attacks.

"Now I'm just thinking of resting and putting ice on my shoulder. Then we'll see."

Rivals including Astana's Fabio Aru, 2 seconds off the lead, and Team Sky's Richie Porte, a further 18 seconds back, may sense an opportunity to exploit his discomfort tomorrow on a stage that has two Category 1 climb – the last 15km long and leading to a summit finish at Campitello Matese.