Axel Laurance started stage 5 holding a two-second lead in the general classification over Schmid, with Tommaso Dati also within ten seconds. A five-rider breakaway formed during the stage, featuring Jacopo Pignatti, Koki Kamada, Martin Svrcek, Andrea Pietrobon and Emanuele Ansaloni, and built an advantage of close to four minutes before being brought under control.
With 35 kilometres to go, the gap had been reduced to under two minutes, and the break was caught with just over 20 kilometres remaining ahead of the final ascent of Monte Stella.
Alan Hatherly attacked immediately after the catch and was joined at the front by Schmid, with the pair opening a gap over the rest of the race. Behind, the peloton split into multiple groups on the climb. Laurance responded from the chase and bridged back across in the final kilometres to form a leading trio with Schmid and Hatherly.
Schmid attacks late to seal stage and GC
Inside the final kilometres, Schmid attacked from the front group, forcing the decisive split. Laurance remained close and launched the sprint in the finishing straight, but Schmid held on to take the stage win in Gemona del Friuli.
Laurance crossed the line in second place, with Hatherly completing the podium on the stage. The result was enough for Schmid to move into the overall lead and secure victory in the general classification, with Laurance second.