(CNN) Not even Marta making history could stop Brazil crumbling to defeat in an astonishing Women's World Cup match against Australia.

Having fallen 2-0 behind in the first half, Australia's hopes of progressing from Group C appeared to be in tatters, but a brilliant fightback secured a 3-2 win to keep alive the Matildas' chances of progressing to the knockout stages.

"It's just outside noise, we don't listen to the haters. Look at that performance comeback back from the deep. I love these girls, they are something else."

Ante Milicic -- who became Australia's coach in January after Alen Stajcic's surprise sacking -- told reporters that the win was "one of the finest Australian performances I've seen."

The Matildas fought back against a side that had last lost a group stage match in 1995, ending a run of three consecutive defeats in the process.

Indeed, only one other team -- Sweden in 1995 against Germany -- has come back from two goals down in the Women's World Cup.

"I'm really really proud for the girls because it hasn't been easy for them," added Milicic, taking charge of only his seventh game.

"They deserve all the rewards that they were given. The circumstances that we won the game and the three points will be a massive confidence booster for them so I'm really delighted for them. They never stopped believing, the coaching staff never stopped believing."

Marta scores from the penalty spot to make Women's World Cup history.

Brazil went ahead through Marta, who scored her 16th World Cup goal and in the process became the first player to score in five editions of the tournament.

It was Elise Kellond-Knight who held onto the falling Leticia Santos for too long inside the box to allow Marta -- who was substituted at the break -- to score from the penalty spot and add to her status as the most prolific goalscorer in Women's World Cup history.

Cristiane -- who on Sunday became the oldest player to score a World Cup hat-trick in either the men's and women's version -- scored her fourth of the tournament with a delicate, but precise, header into the bottom-right corner.

Foord's goal before half-time ensured Australia went into the break with hope.

But before half-time Caitlin Foord gave the Matildas a lifeline by guiding Tameka Yallop's cross into the net, while a cross by Chloe Logarzo -- intended for captain Sam Kerr -- curled into the net to draw the Matildas level.

Australia's third goal was only given after a lengthy VAR review.

After Monica had headed the ball into her own net, the goal was initially disallowed as Kerr was deemed offside. But having reviewed the play, the referee awarded the goal, judging that Kerr -- running into the box and a few meters ahead of Monica -- was not interfering with play.

The result means three teams in Group C are on three points, with Italy -- playing Jamaica on Friday -- having played one fewer games than Australia and Brazil.

Germany qualifies after China win

In the day's other match, China beat World Cup debutants South Africa 1-0 thanks to a Li Ying volley minutes before half-time.

China's victory meant Germany -- which has won its opening two games -- qualifies for the last 16. China and Spain, level on three points, will play each other on Monday in a match which will decide second place.