Chile qualified behind Germany from Group B to reach the Confederations Cup semi-finals, after drawing 1-1 with Australia in their final group game.
Euro 2016 winners Portugal will now face Chile in the last four on Wednesday (18:00 GMT).
Australia went ahead through winger James Troisi, before substitute Martin Rodriguez levelled from close range.
World champions Germany moved above Chile with a 3-1 win over Cameroon and will play Mexico on Thursday (19:00).
RB Leipzig forward Timo Werner scored twice, with Hoffenheim midfielder Kerem Demirbay also on target for the experimental German squad competing in Russia.
Porto forward Vincent Aboubakar netted for Cameroon, who finished bottom of the group, with a draw from their match against Australia their only point.
Confederations Cup semi-final fixtures
Portugal v Chile (Wednesday 28 June 18:00 GMT)
Germany v Mexico (Thursday 29 June 18:00 GMT)
- Portugal, Euro 2016 winners
- Mexico, 2015 Concacaf Cup winners
- New Zealand, 2016 OFC Nations Cup winners
- Russia, qualify as 2018 World Cup hosts
- Cameroon, 2017 Africa Cup of Nations winners
- Chile, 2015 Copa America winners
- Australia, 2015 Asian Cup winners
- Germany, 2014 World Cup winners