The world champion attacked with 70 kilometres left in the race and was joined by Gianni Moscon (Ineos Grenadiers) and Giulio Ciccone (Trek-Segafredo). Once caught inside the final two kilometres, Alaphilippe then went into leadout-mode, setting up Ballerini's sprint as he helped manouevre the sprinter to the front with a kilometre to go.
Ballerini was well back when Arnaud Demare's (Groupama-FDJ) sprint was launched, but he squeezed down the barriers to come around French champion Démare and claim stage victory and the overall lead.
"For sure, I was so close to the barriers, but I found the space," said Ballerini. "The first thing I have to say thanks to all the team, they did a very great job.
"The sprint wasn't easy. When Démare started he took I think five or six metres. I tried to take his wheel, but it was very windy in the final, but I found the right speed and I won. The wind was coming from the right. For sure I didn't have space on the left, so I needed to try to go to the right."
The Alaphilippe attack was the talking point of the day, with the world champion looking in good form as he stretched his legs in early season competition.
"The strategy was to try something just after 110km so we tried with Julian, and he was really, really good," said Ballerini. "He was only caught with maybe 1.5km to go and he also gave a hand for the team, so I think he has really good legs for the general."