Cristiano Ronaldo scored his 137th international goal for Portugal as they came from a goal down to beat Germany and reach the Nations League final.
The 40-year-old tapped in Nuno Mendes’ low pass in the 68th minute for what proved to be the winner and set up a final against either France or Spain.
Ronaldo’s effort came just five minutes after Francisco Conceicao had cancelled out a 48th-minute Florian Wirtz opener for the hosts.
Portugal won the first tournament in 2019, but their hopes of a second success looked slim when they fell behind in Munich.
Bayer Leverkusen forward Wirtz, close to completing a £109m move to Premier League champions Liverpool, headed Germany in front, connecting with a clever lofted ball over the defence by Joshua Kimmich, who was making his 100th appearance.
Portugal were furious the goal was allowed to stand as they thought German debutant Nick Woltemade had blocked off defender Ruben Dias and, despite referee Slavko Vincic being advised to watch the incident again on a pitchside monitor, the strike was allowed to stand.
But substitute Conceicao scored a fine 63rd-minute equaliser.
Having only come on five minutes earlier, he collected the ball close to the right touchline before running at the home defence and curling an excellent finish past Marc-Andre Ter Stegen.
Ronaldo, unmarked from close range, added the decisive second goal to turn the tie around, although Germany nearly forced extra time when Karim Adeyemi’s strike hit the post.
France and Spain play the second semi-final in Stuttgart on Thursday, with the final in Munich on Sunday.