Stybar, who not only wanted to win the stage but to also support Spanish teammate Enric Mas, finished the 173.5km-long race in 4:13:18 hours.
Denmark’s Soren Kragh Andersen (Sunweb) was second placed and three seconds behind, the Netherlands’ Wout Poels (Sky) was third and nine seconds behind, both trying to steal the victory from Pogacar.
Stybar’s victory was worth a six-place climb in the general classification.
Although Pogacar was ‘isolated’, the overall leader since the Fóia climb on the second day, finished the last stage in sixth place.
In second place in the general classification was Andersen and in third was Poels.
All the remaining cyclists finished over a minute behind the leader, with two Portuguese in the Top 10 – Amaro Antunes (CCC Team) in 8th, 2:52 minutes from the yellow jersey, and João Rodrigues (W52-FC Porto) in 9th.
Portugal’s Joaquim Silva (W52-FC Porto) was disqualified from the tournament for being “pushed by the team’s vehicle” in the final stage, according to the organisation.