In the end they had to go to the photo on the finish line, with the Frenchman edging out the Bora-hansgrohe rider by a goatee hair.
Fellow breakaway companion Alessandro de Marchi (CCC) was left behind on the final climb and finished 22 seconds in arrears on a stage that saw little change in the general classification.
“I’m always hungry and every victory is important, but to take a stage at the Dauphiné – my first race of the season in France – is really special and makes me extremely happy," said Alaphillipe. "The stage was long and hard, but we worked well together and opened that huge gap.
"In the sprint, I knew that Gregor was explosive and that with the headwind it was important not to go too early. It’s a beautiful win, good for my confidence before the Tour de France, and the fact that it brought me also the blue jersey makes it a really perfect day.”
The long ride from Saint-Vulbas on the Plaine de l'Ain to Saint-Michel-de-Maurienne included eight categorised climbs and was made even more tricky by heavy rain at the start and a stiff headwind once the sun emerged to dry the road and the riders.
Alaphilippe, Mühlberger and De Marchi attacked on the first rise of the stage, with the Frenchman keen to be in the move of the day.
Team Sunweb led the initial chase and it looked as though the trio wouldn’t be given much freedom to stay away.
However, after 50 kilometres of pursuit the peloton had given up and allowed the group to fight it out for the stage win. Working well together, the three-riders opened up huge lead of over 13 minutes at one point, though the gap was brought down steadily into the finish line where Alaphillipe finished with just over six minutes advantage.
The only major casualty on the general classification was Wout van Aert (Jumbo-Visma) who paid for his efforts in winning the previous two stages as he was dropped early.