Portugal scored a 94th-minute winner on Wednesday to seal a place at football’s Women’s World Cup for the first time, while Haiti will also make their tournament debut.
The Portuguese will face reigning world champions the United States, 2019 finalists Netherlands and Vietnam in a tough Group E at the World Cup.
New Zealand and Australia are co-hosting the tournament in July-August.
Carole Costa was the hero, holding her nerve from the penalty spot in Portugal’s playoff against Cameroon in Hamilton to give them a dramatic 2-1 win deep in stoppage time.
Diana Gomes had given Portugal the lead in the first half, only for Ajara Nchout Njoya to level for Cameroon in the 89th minute.
Earlier, Haiti also qualified for the Women’s World Cup for the first time in their history with a 2-1 win over Chile.
Haiti join England, Denmark and China in Group D.
Haiti, ranked 55th in the world, will face European champions England in their opening match in Brisbane on July 22.
Teenage midfielder Melchie Dumornay, who plays for French club Stade de Reims, gave Haiti the lead just before half-time in Auckland.
Haiti had a penalty saved with 90 minutes approaching when captain Nerilia Mondesir saw her weak penalty palmed away.
However, the 19-year-old Dumornay doubled Haiti’s lead when she calmly slotted past Chile goalkeeper Christiane Endler in added time.
Substitute Maria Jose Rojas scored a consolation for Chile at the death.
The last qualifying spot will be decided Thursday when Paraguay face Panama. The winners will meet France, Jamaica and Brazil in Group F.