Pedro Neto's Portugal came from behind to beat Germany 2-1 and book their place in Sunday's Nations League final.
The 2019 champions had gone behind to hosts Germany, as Florian Wirtz headed in Joshua Kimmich's expert cross early into the second half.
But substitute Francisco Conceição equalised with a superb effort from distance just five minutes after entering the field.
And Cristiano Ronaldo finished off a slick team move five minutes after that to score his 137th senior international goal and break the Nations League A record for the most goals in a season (7).
Joao Felix and Renato Veiga, who have been on loan at AC Milan and Juventus respectively during the second half of this season, were both unused substitutes.
Blues defender Marc Cucurella will be hoping to join Portugal in Sunday's final when Spain take on France in the other semi-final on Thursday night.