Cristiano Ronaldo's stunning hat-trick fired hosts Portugal into the Nations League final after a 3-1 win over Switzerland at the Estadio do Dragao.
The Juventus forward opened the scoring with a fine free-kick after 25 minutes.
Switzerland, though, equalised through a controversial penalty in the 56th minute.
German referee Felix Brych had initially awarded a spot-kick to Portugal, before going back to check a previous incident in the other area.
Following a long delay while he watched replays on the pitchside monitor, Switzerland were given a penalty for what was ruled as a foul by Nelson Semedo on Steven Zuber. AC Milan defender Ricardo Rodriguez converted from 12 yards.
Ronaldo, though, had the final say when he struck twice during the closing three minutes to complete his treble.
Bernardo Silva cut the ball back for the Juventus man to drive past Yann Sommer and Ronaldo then made sure of a place in Sunday's final against either England or Holland with another fine low finish.