Watch all the action from the 2024 Giro d'Italia live and free on SBS VICELAND from May 4-26, with all the replays and highlights on , plus news, analysis and much more on the SBS Sport website.
A technical finish left several sprinters without their lead-out men for the final few hundred metres, including Merlier and Milan.
Nevertheless, the Soudal-Quick Step rider was able to get back into position, before overtaking Groves (Alpecin-Deceuninck) and edging past Milan (Lidl-Trek) at the line.
“The last kilometre was really fast and I was a bit surprised already after the corners I was in the last five or six wheels,” Merlier said, who was also victorious on Stage 3.
“But when I found my moment, I started my sprint, I had to go around but I made it in the end.”
Groves, meanwhile, was less pleased with the result, perhaps ruing the timing of his attack to the line.
"I think maybe it was a bit too early," Groves said after the race. "It's possible there was a bit of headwind.
"But these guys are so fast so there's no excuses."
"I'm not a pure sprinter and it's showing," he added. "I don't quite have the speed.
"My performances - I've been happy with, I'm just not happy with the result."
The nature of the stage meant little happened in the general classification, Tadej Pogacar (UAE Team Emirates) preserving his 7’43” advantage over Daniel Martinez (Bora-Hansgrohe) ahead of the final three stages.
Pogacar and the peloton will now head back to the hills for the next stage – a 157-kilometre journey to Sappada – before the Monte Grappa awaits on the penultimate day.
The Slovenian is believed to add to his GC supremacy on Stage 20, having admitted his fondness for the route before enjoying the final day in Rome.