Australia fought back from two goals down to beat Brazil 3-2 in Montpellier on Thursday and keep their Women’s World Cup hopes alive.

Marta, with a penalty, and Cristiane, with her fourth goal of the tournament, put Brazil two up after 38 minutes.

But Australia fought back to inflict a first World Cup group-stage loss on Brazil in 24 years.

Marta has now scored in five World Cups and the penalty increased her record tally of goals in finals to 16.

“It would feel much better with a win,” she said. “It’s one more detail written in the history of women’s football. I am honoured, but there’s more to do at this tournament.”

Brazil cracked under the Matildas’ relentless barrage of crosses.

Caitlin Foord scored in first-half added time. Then two ugly Brazilian misjudgements presented Australia with the lead.

First, Barbara reacted too late to Chloe Logarzo’s low cross and allowed it to bounce into the net in the 58th minute.

Then, Monica headed a long, hopeful Australian punt into her own net after 66 minutes with the goal standing after a VAR review.

“It was nice to come out swinging when our backs are against the wall,” Logarzo said of Australia’s second half. “We like a good fight.”

The match proved a vindication of the tactics which had been heavily criticised after the opening loss to Italy.

Again they methodically worked the ball down the flanks and put in a string of high crosses, even though the players waiting in the centre were often star striker Sam Kerr, who is 1.68m (5ft 6in) and Tameka Yallop who is 1.60m (5 ft 3in).

“At times we were perhaps a little direct,” said coach Ante Milicic.

“There were a lot of critics talking about us, but we’re back, so suck on that one,” Kerr, whose presence distracted Barbara before the second goal and Monica in the run-up to the third, said.

“We don’t listen to the haters. I love these girls. You can see what it means to us. We knew we were a top 10 team. Now we’re back in it.”

Broken leg

Logarzo, who suffered a broken leg in late February, was selected as player of the match for her relentless effort.

“I will let you in on a little secret,” she said. “It was a just a through ball to Sam. Sam did a great job of disguising it and putting the goalkeeper off, so I will take it.”

Marta, who has been battling injury, and 41-year-old midfielder Formiga, on a yellow card, went off at half-time.

“When I noticed Marta wasn’t on the field and Formiga wasn’t on the field, I wouldn’t say that was a positive for us but maybe for the Brazil team when two big players with such a presence are off the field I’m not sure how that affected them,” said Milicic.

Cristiane, who is 34 and had scored her 11th World Cup goal in total, followed with 15 minutes left and her team in desperate need of a goal.

Milicic said his team sets out to wear opponents down.

“As the game went on we looked very strong but a couple of their players had cramp,” he said.

The result leaves Australia and Brazil level on points with Italy, who play their second match against Jamaica in Reims on Friday, atop Group C.

The forgiving format means the top three teams could go through to the last 16.

Australia, who have reached the quarter-finals in the last three World Cups, face Jamaica in their last group game, while 2007 finalists Brazil, who have reached the knockout rounds in the last five editions, face Italy.

China win

A solitary strike by Li Ying gave China a 1-0 victory over South Africa in Paris on Thursday and ensured that Germany and hosts France are guaranteed qualifiers for the last 16 of the women’s World Cup.

Li, who was brought into the Chinese starting line-up following their opening 1-0 loss to the Germans in Group B, got in front of Bambanani Mbane in the box to turn in Zhang Rui’s delivery five minutes before half-time.

China almost scored again moments later when Wang Shanshan’s header at a corner came off the underside of the bar and bounced down, not quite crossing the line in its entirety.

The former runners-up deserved their victory, played out before just over 20,000 fans at the Parc des Princes, with South Africa lacking quality in the final third despite their efforts.

“This victory belongs to all the players, they deserve it. There will be more battles to come and I hope we can last as long as possible in this tournament,” said China coach Jia Xiuquan.

The Germans, winners of the World Cup in 2003 and 2007, had beaten Spain 1-0 on Wednesday, having already defeated China by the same scoreline in their first match.

They have six points, three more than both China and Spain, who clash on the final matchday, meaning they are certain to finish in the top two places.

The result also confirms France’s passage to the knockout phase from Group A, with the hosts now certain to finish, at worst, as one of the best third-placed teams.