Cristiano Ronaldo opened the scoring after being set free by a brilliant pass by Joao Moutinho.
Zlatan Ibrahimovic equalised for Sweden shortly afterwards but they still needed two more.
Ibrahimovic scored a second shortly afterwards but Ronaldo still led on away goals.
Comeback? Ronaldo wasn't having any of it, and brought the score for the night back to all square.
And Ronaldo put it out of Sweden's reach again when he sealed his hat-trick two minutes later, earning the applause of Ibrahimovic.
GIFs: Bleacher Report
Feature image: SPORTSFILE