Morocco have reached the last 16 on their Women`s World Cup debut after beating Colombia - although the South Americans progress as Group H winners.
Germany`s failure to beat South Korea means Morocco are into the knockout rounds as runners-up.
Anissa Lahmari scored the only goal via a rebound after captain Ghizlane Chebbak`s penalty was saved.
Morocco - who lost 6-0 to the Germans in their opener before successive wins - will face France in Adelaide next.
Colombia, who earned two wins in their first two matches and finish above Morocco on goal difference, will play Jamaica in Melbourne earlier on 8 August.
Of the eight debutants at the 2023 Women`s World Cup, seven had already exited the tournament before this match. Only Philippines, by beating co-hosts New Zealand, and Portugal in giving the USA a mighty scare, had come close to reaching the knockout stage.
Step forward Morocco. Reynaud Pedros` side have recovered from their World Cup debut hammering to put in two impressive performances against South Korea and Colombia, and earn historic passage to the last 16.
They started brightly here - Ibtissam Jraidi`s third-minute shot was turned behind by Catalina Perez at near post, before Chebbak almost caught the keeper out from a well-worked corner - and continued to look the more threatening side until they took the lead.
Jraidi was bundled over clumsily in the area by Daniela Arias, and though Chebbak`s spot-kick was saved by Perez, the rebound was turned in by Lahmari.
As Germany tried and failed to find a winner against South Korea, Morocco stood sturdy to earn a remarkable and unexpected path into the knockouts.
At Qatar 2022, the Morocco men`s team became the first African side to reach a Fifa World Cup semi-final. The country is now seeing a second historic football achievement in the space of a year.
Colombia muted but still top group
Had Germany won, Colombia would have still needed a point to guarantee top spot in Group H.
As such, manager Nelson Abadia named a strong starting XI - the same one as against South Korea in the 2-0 win to open their tournament - featuring four players one yellow card away from missing their next match.
The inherent risk was exposed when full-back Manuela Vanegas - who scored the 97th-minute winner against Germany - was booked early in the second half. She will miss the meeting with Jamaica.
Also concerning for Abadia was his side`s muted attacking performance, with star winger Linda Caicedo anonymous following her heroics in the opening two matches, while they also lacked the bite in midfield seen in Sydney.
Colombia did improve in the second half, roared on by a loud and colourful crowd as they have been all tournament. Daniela Montoya`s low drive was saved by the boot of Khadija Er-Rmichi before Lorena Bedoya lashed narrowly wide, while Mayra Ramirez hit the post from a tight angle.
However, they must rediscover the verve shown against the Germans to stay on target for a possible meeting with England in the quarter-finals.