Jamaica produced a huge World Cup upset in Melbourne by holding Brazil to a goalless draw to reach the last 16 for the first time.
Brazil, who needed victory to progress, dominated their final Group F encounter at AAMI Park but could not find a breakthrough and bowed out at the group stage for the first time since 1995.
The Reggae Girlz, who held France 0-0 in their opening match before beating Panama 1-0, have yet to concede a goal at the tournament and finished second behind group winners France.
Players from both sides wept at the final whistle, while there was to be no fairy-tale for Brazil’s six-time world player of the year Marta, who was substituted in the second half.
Brazil made all of the running in the first period, producing 10 attempts on goal – six on target – as Jamaica defended with dogged discipline.
Marta, back as Brazil’s captain in her first tournament start, had an early shot saved by Jamaica’s Tottenham goalkeeper Rebecca Spencer, who also kept out Luana’s header and Tamires’ angled effort without being overly troubled.
Tamires threatened again shortly before the break after being played in by Ary Borges, but Spencer saved again at her near post.
After the interval, Brazil picked up where they had left off, pushing forward in search of the goal they needed to keep their hopes alive.
But for all their possession and neat build-up play, they failed to create any clear-cut chances as Jamaica stood firm and the nerves among Brazil’s fans in the stands began to set in with 25 minutes remaining.
Spencer was alert to catch Alison Swaby’s miscued attempted clearance in the 78th minute and shortly afterwards Brazil manager Pia Sundhage made her last throw of the dice.
Marta, appearing at her sixth World Cup finals, was replaced by Andressa Alves, while Duda Sampaio came on for Luana.
Jamaica almost snatched the lead with a rare chance on goal when Manchester City striker Khadija Shaw broke clear and fired narrowly over.
Brazil substitute Alves then had a chance for glory in the 89th minute but her free-kick from outside the area was comfortably held by Spencer.
One last chance fell to Brazil in the final minute of time added on, but Debinha’s header following a penalty area scramble was smothered by Spencer and Jamaica held on for a famous win.