Tim Declercq (Deceunincl-QuickStep) was the final man caught from the breakaway, with the peloton revving up on the final climb with five kilometres remaining in the race.
Zdenek Stybar attacked over the top of his Deceueninck-Quickstep teammate and looked to be making decent headway up the climb until he was overtaken by a strong surge from Sergio Higuita (EF Education First) and George Bennett (Jumbo-Visma).
Bennett pushed on hard during the descent, with Higuita sitting on to protect his team's race leader, Tejay van Garderen.
The pair were dragged back with less than three kilometres remaining as riders up on the general classification scrambled to avoid losing time.
In the end it was a group of 26 riders that contested the final sprint, with Cortina coming off the wheel of Max Richeze (Deceuninck-QuickStep) to take the victory.
Tejay van Garderen (EF Education First) retained the race lead and holds a four-second lead over Kasper Asgreen (Deceuninck-QuickStep) going into the potentially decisive finish atop Mt Baldy for Stage 6.