Brazil are an acknowledged powerhouse of the women's game and had not conceded a goal in group play in the previous four World Cups. To score any goals at all – never mind three – was a rare achievement: to do so having gone two behind was remarkable. Swiss referee Esther Staubli checks the VAR monitor before awarding Australia's winning goal. Credit:AP This is the sort of win that can build confidence and restore self belief that was shaken by that first match loss to Italy. The Matildas have always believed they could challenge for the title, but that defeat, coupled with the criticism of their tactics and the debate over whether sacking previous boss Alen Stajcic so close to the tournament had contributed, had taken a mental toll. This will go a long way to killing off both those narratives.

Matildas coach Ante Milicic had rung the changes and shuffled his line-up, leaving out the injured Clare Polkinghorne, shifting regular left back Steph Catley to centre-half and bringing Elise Kellond-Knight in at left back. Caitlin Foord celebrates scoring Australia's first goal against Brazil. Credit:AP Hayley Raso, who started against the Italians, made way on the flank, with Emily Gielnek brought in on the wing to add power, strength and height as the Australians looked to force the pace and tempo. They certainly began brightly, dominating possession and playing with an intensity that was lacking, certainly at the start, of their opening game. This was a more cohesive unit, pressing high and not allowing the Brazilians, who so often rely on moments of individual skill and expression from their star players, to settle on the ball.

Records broken in Matildas' win The Matildas became the first team to come from behind to defeat Brazil at the tournament.

The Matildas were just the second team to come from two goals down to win a World Cup match, after Sweden’s defeat of Germany in 1995.

Marta extended her record of most Women’s World Cup goals with her 16th strike, and became the first woman to score at five World Cups.

Caitlin Foord became the first woman to score a goal in the World Cup group stage against Brazil in 16 years. Australia’s tally of three goals was the most Brazil has conceded in a group match since 1999. The Matildas looked to impose themselves on the game right from the outset, although they were given an early warning of what could occur if their concentration lapsed when Brazilian forward Debinha found Tamires who forced goalkeeper Lydia Williams to dive and gather at her near post. After that, the Matildas made the running, with Logarzo and Tameka Yallop working hard in midfield to win the ball and create opportunities, but could not capitalise on their possession. Australia's players celebrate after Chloe Logarzo scored their side's second goal. Credit:AP Sam Kerr headed wide from an Ellie Carpenter cross, then provided another cross for Yallop to head wide.

The Australian midfielder was then brought down by Formiga, earning the latter a booking that will keep her out of Brazil's final group game. Loading The Matildas had a penalty shout in the 20th minute when Yallop went down in the area after a challenge by Thaisa. Swiss referee Esther Staubli consulted the VAR and had a long look before ruling that the ball had hit Yallop's arm in the build-up, negating any penalty claim. Three minutes later, Staubli was again waving at the spot, this time at the other end and without any VAR consultation as she awarded Brazil a penalty after Kellond-Knight had grabbed a handful of Leticia Santos' shirt as she challenged for the ball, allowing the Brazilian to go to ground. It looked soft, but Santos was given every opportunity to make the most of Kellond-Knight's indiscretion, and did.

The South Americans' superstar, Marta, stepped forward to slam past Williams to put Brazil ahead against the run of play. Marta scores from the spot for Brazil. Credit:AP The Matildas almost got back on level terms soon after when Kerr got to a Kellond-Knight cross before the defender but her stabbing shot was saved by Barbara. Brazil grew in confidence after their goal and began to get more into the game. They doubled their advantage seven minutes from half-time with a goal that exposed Australia's weakness at the back.

Loading Tamires brought the ball forward from defence, nutmegging Gielnek before finding Debinha with a pass down the flank. Her cross hung in the air and powerful forward Cristiane was simply too strong and out-muscled Catley to head past Williams. The Brazilian had scored a hat-trick in the opening 3-0 win over Jamaica so is now very much in the running for the golden boot award. The Matildas did not drop their heads, however, and Carpenter created space for Gielnek to shoot, only for Barbara to save. And their persistence paid off in first-half stoppage time when Foord pulled a goal back.

The goal came after some sustained pressure and was the result of excellent approach play by Yallop and Logarzo. The former fired in a well-flighted cross from the left and Logarzo got in between defenders to head the ball across goal: Foord reacted fastest, getting behind Brazil defender Monica to slam home a sliding shot from close range.

Brazil had a good chance to stretch their lead shortly after the restart when Cristiane unlocked the Australian defence to set up Debinha, but her shot flew wide of Williams' post. The Matildas caused panic in the Brazil defence when Barbara flapped at Yallop's free kick but when the rebound came to the same player her shot flew over the bar. As Brazil chased a third goal and the Australians an equaliser, the game began to stretch - something Milicic had feared. But it was Australia that found the target next with a 58th-minute goal that Brazilian keeper Barbara and her defence will not want to see again. Logarzo floated in a cross from the right looking for Kerr's run towards the near post. Kerr and the defenders all missed the ball and, perhaps unsighted, it bounced past Barbara and into the net.