Chile qualified behind Germany from Group B to reach the Confederations Cup semi-finals. after drawing 1-1 wiith Australia in their final group game.
Euro 2016 winners Portugal will now face Chile in the last four on Wednesday (19:00 BST).
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 19:00 BST)
- Germany v Mexico (Thursday 29 June 19:00 BST)