Defending champions the USA suffered a huge scare against Women's World Cup debutants Portugal before scraping through to the last 16.
The Stars and Stripes are yet to fire at the tournament and, after being held by the Netherlands in their previous match, suffered another frustrating draw that raised questions about their hopes of winning the tournament for an unprecedented third time in a row.
Portugal, who would have caused one of the greatest upsets in the competition's history had they won, hit the post through Ana Capeta in the 91st minute.
In the end the USA were relieved to hear the full-time whistle, the point enough to take them through as runners-up to the Netherlands, who thrashed Vietnam 7-0.
However, the United States were once again far from their best as they struggled to break down a gritty Portugal defence, while keeper Ines Pereira produced two fine saves to deny recalled forward Lynn Williams.
The world's number one side will now face the winners of Group G, which will be decided on Wednesday with Sweden - the last nation to defeat the USA in a 90-minute game at the World Cup - set to finish top unless there is a 10-goal swing.
On a bitterly frustrating night for the four-time world champions in Auckland, midfielder Rose Lavelle was booked and will miss the next game after her second caution of the tournament.
USA fail to impress
The US came into this tournament as hot favourites to win it, but they have failed to impress in front of their thousands of travelling fans in New Zealand.
They finish the group stage with five points - two behind the Netherlands - and questions as to why they look a shadow of the team that conquered the world in 2015 and 2019.
After missing a host of chances in their opening 3-0 win over debutants Vietnam, the US were held by the Netherlands in a repeat of the final four years ago.
Manager Vlatko Andonovski had named the same starting XI for the first two games but opted to made two changes as Lavelle, who has recovered from a recent knee injury, started after coming off the bench to provide the assist for Lindsey Horan to equalise against the Netherlands.
Forward Williams also got her first taste of this World Cup as Savannah DeMelo and Trinity Rodman dropped out.
But the changes failed to inspire the US, who failed to score in a World Cup game for the first time since being held 0-0 by Sweden in 2015.
Portugal's Ana Capeta hits the post against the United States in the 91st minutePortugal bow out with heads held high
Portugal, who finished third in the group - one point behind the USA - exit the competition with their heads held high after going so close to causing an almighty shock.
They played 13 matches - 10 group games and three play-off matches - to reach their first World Cup and only secured a place with a 2-1 win over Cameroon in February.
Having lost narrowly to the Netherlands in their opening group game, Francisco Neto's side secured a historic first win on the global stage as goals by Telma Encarnacao and exciting young talent Francisca Nazareth defeated Vietnam 2-0.
The fact Portugal went into the third group game still in with a chance of qualifying for the knockout stage will be seen as progress.
Against the United States, they were strong at the back and quick on the break with Jessica Silva wasting a great chance in the first half before Nazareth went close.
The fourth official had just signalled a minimum of eight additional minutes when substitute Capeta struck the post.
Player of the match
Joana MarchãoJoana Marchão
Portugal
Squad number5Player nameJoana Marchão
Squad number21Player nameAna Capeta
Squad number20Player nameKika Nazareth
Squad number16Player nameDiana Silva
Squad number8Player nameAndreia Norton
Squad number14Player nameDolores Silva
Squad number2Player nameCatarina Amado
Squad number11Player nameTatiana Pinto
Squad number15Player nameCarole Costa
Squad number9Player nameAna Borges
Squad number19Player nameDiana Gomes
Squad number23Player nameTelma Encarnação
Squad number10Player nameJéssica Silva
Squad number6Player nameAndreia Jacinto
Squad number1Player nameInês Pereira
USA
Squad number13Player nameMorgan
Squad number5Player nameO'Hara
Squad number1Player nameNaeher
Squad number11Player nameSmith
Squad number20Player nameRodman
Squad number4Player nameGirma
Squad number8Player nameErtz
Squad number23Player nameFox
Squad number16Player nameLavelle
Squad number10Player nameHoran
Squad number6Player nameWilliams
Squad number19Player nameDunn
Squad number17Player nameSullivan
Squad number14Player nameSonnett
Squad number7Player nameThompson
Squad number15Player nameRapinoe
Line-ups
Portugal
Formation 4-1-2-1-2
1Teixeira Pereira
9Marques Borges19Ribeiro Gomes15da Silva Costa2Silva Amado
14Jácome da Silva
11Ferreira Pinto8Norton
20Ramos Ribeiro Nazareth Sousa
16Abreu de Sousa e Silva10Manjenje Nogueira Silva
1Teixeira Pereira9Marques Borges19Ribeiro GomesBooked at 72mins15da Silva CostaBooked at 56mins2Silva AmadoBooked at 85minsSubstituted forGaspar Silva Marchãoat 89'minutes14Jácome da Silva11Ferreira Pinto8NortonSubstituted forVelosa Encarnaçãoat 81'minutes20Ramos Ribeiro Nazareth SousaSubstituted forde Jesus Jacintoat 62'minutes16Abreu de Sousa e SilvaSubstituted forPalma Capetaat 90'minutes10Manjenje Nogueira SilvaSubstitutes
3de Sousa Alves4Garcia Rebelo5Gaspar Silva Marchão6de Jesus Jacinto7Santos Marques Rodrigues12de Sousa Barros Morais13Figueira Pinto17da Silva Seiça18Trindade Coruche Mendes21Palma Capeta22Campos Costa23Velosa EncarnaçãoUSA
Formation 4-3-3
1Naeher
23Fox8Ertz4Girma19Dunn
16Lavelle17Sullivan10Horan
6Williams13Morgan11Smith
1Naeher23Fox8Ertz4GirmaBooked at 81mins19DunnSubstituted forO'Haraat 90+7'minutes16LavelleBooked at 39mins17Sullivan10HoranSubstituted forSonnettat 84'minutes6WilliamsSubstituted forRodmanat 84'minutes13MorganSubstituted forThompsonat 90+7'minutes11SmithBooked at 52minsSubstituted forRapinoeat 61'minutesSubstitutes
2Sanchez3Huerta5O'Hara7Thompson9DeMelo12Cook14Sonnett15Rapinoe18Murphy20Rodman21Kingsbury22MewisReferee:Rebecca WelchAttendance:40,958Live Text
Match ends, Portugal 0, USA 0.
Second Half ends, Portugal 0, USA 0.
Substitution, USA. Alyssa Thompson replaces Alex Morgan.
Substitution, USA. Kelley O'Hara replaces Crystal Dunn.
Attempt missed. Megan Rapinoe (USA) right footed shot from outside the box misses to the left. Assisted by Alex Morgan with a headed pass.
Ana Capeta (Portugal) wins a free kick on the left wing.
Attempt missed. Alex Morgan (USA) right footed shot from the centre of the box misses to the left. Assisted by Megan Rapinoe with a cross.
Attempt missed. Andreia Jacinto (Portugal) right footed shot from outside the box is too high.
Ana Capeta (Portugal) hits the right post with a right footed shot from the centre of the box. Assisted by Telma Encarnação with a through ball.
Attempt missed. Alex Morgan (USA) left footed shot from the left side of the box is high and wide to the left. Assisted by Megan Rapinoe with a through ball.
Substitution, Portugal. Ana Capeta replaces Diana Silva.
Substitution, Portugal. Joana Marchão replaces Catarina Amado.
Delay over. They are ready to continue.
Delay in match because of an injury Inês Pereira (Portugal).
Inês Pereira (Portugal) wins a free kick in the defensive half.
Foul by Emily Sonnett (USA).
Corner, USA. Conceded by Catarina Amado.
Catarina Amado (Portugal) is shown the yellow card for a bad foul.
Foul by Catarina Amado (Portugal).