Denmark booked their place in the World Cup last 16 with a 2-0 win over Haiti to finish second in Group D behind England.
Haiti were undone by a penalty for a third game in a row, with Pernille Harder scoring from the spot after Dayana Pierre-Louis’ handball.
Sanne Troelsgaard sealed the Danes’ progression to the knockout stages with a second goal deep into injury time.
Denmark face Group B winners and co-hosts Australia in Sydney on Monday.
It will be Denmark’s first World Cup knockout match in 28 years, since they lost to Norway in the quarter-finals of the 1995 tournament.Ranked 13th in the world, the Danes were guaranteed of a place in the round of 16 with a win and a better outcome than China’s result against England in the other match in the group.
Haiti, meanwhile, needed a victory and the Lionesses to beat China if they were to have any chance of reaching the last 16.
Denmark, who failed to get out of their group at last summer’s European Championships, raced out of the blocks in Perth.
Simone Boye thought she had netted the opener after just five minutes, but after a Video Assistant Referee delay, her effort was eventually chalked off for offside.
VAR did not come to Haiti’s rescue, though, when the ball struck Pierre-Louis’ arm in the penalty area and referee Jeong Oh-hyeon pointed to the spot without the aid of the pitch-side monitor.
Harder, who signed for Bayern Munich earlier this summer, sent goalkeeper Kerly Theus the wrong way in the 21st minute as she scored the 100th goal of this year’s tournament.
The former Chelsea forward shone throughout for Denmark, finding the back of the net on two more occasions, only for both to be ruled out – the first was flagged for offside while the second was ruled out by VAR after Signe Bruun’s late challenge on Theus.
Melchie Dumornay, who impressed against England and China, once again proved to be Haiti’s biggest attacking threat.
But their late charge for a first-ever World Cup goal allowed Denmark to counter-attack with venom and Lars Sondergaard’s side got their second when Troelsgaard calmly slotted home when through one-on-one with Theus.