Substitute Kyah Simon's 80th minute strike snatched victory for Australia as they progressed to the quarter-finals by upsetting the odds to beat Brazil tonight.
Following victories for Germany and China yesterday, Brazil and Australia today fought to become the third team to qualify for this year's Women's World Cup quarter-finals, with the winner to face either Japan or the Netherlands.
Brazil secured their place in the last 16 with a game to spare, victory over Spain in their second game of Group E doing the job, meaning they headed into their final match against Costa Rica with nothing to play for except maximum points.
As a result, their last team was a much changed one, meaning many alterations were made ahead of today's knockout match. Six were made in total, with Fabiana, Formiga, Thaisa, Marta, Andressa Alves and Cristiane all returning to the starting eleven, replacing Poliana, Raquel Fernandes, Maurine, Rosana, Gabriele and Darlene. In other words, the team that started today was the same that started against Spain.
They also switched back to their 4-2-3-1 set up, having lined up in a rather straight-forward 4-4-2 against Costa Rica.
Australia also reverted back to the same formation as the Brazilians, having operated in a 4-3-3 in their last outing against Sweden, where a 1-1 draw was enough for them to clinch second place and progress from the group as the USA beat Nigeria.
They made two changes in personnel too, bringing in Tameka Butt for Katrina Gorry and Michelle Heyman for Kyah Simon.
With Brazil one of the competition's favourites and Australia having been beaten by the South Americans in both the 2011 and 2007 World Cups, as well as at the last two Olympic Games, it was clear who the underdog was in this tie.
However, Australia have played some sublime football in Canada this summer, coming out of the blocks fast to surprise the USA in their opening group game, with goalkeeper Hope Solo the only thing in-between the Matildas and a good result, in the end.
Whilst the element of surprise may not remain that much anymore, Brazil would still face a tough test against a young, energetic side who like to move the ball quickly and are very positive in possession. Still, their defence is yet to leak a goal this summer and their attack, consisting of the likes of Marta and Formiga, has been impressive, if not always the most clinical.
Chances would need to be taken though, with both sides guilty of otherwise in the group stages, even if it did not prove that costly in the grand scheme of things as they both progressed regardless.
Both teams struggled to get hold of the game early on, with the opening ten minutes or so very unsettled as the ball bounced around midfield with players lacking composure as they knocked it around. They each showed promise going forward, but failed to make much impact in the final third in the opening stages.
Cristiane had the first shot on goal with seven minutes played, her 20-yard effort straight at Lydia Williams though in Australia's goal, whilst the Matildas' first decent opportunity came three minutes later as Samantha Kerr smashed the ball into the side-netting on the volley from Emily Van Egmond's corner.
Caitlin Foord almost made herself a good chance moments after the latter, driving inside from right-back and taking on numerous opponents before just hesitating to shoot when she found a yard of space to do so on the edge of the box.
Possession was extremely even as we neared the 20 minute mark, with both having good spells on the ball but failing to create anything of note. Tamires' dangerous but inaccurate cut-back from the left flank was the most threatening moment at one end, whilst Michelle Heyman's run through the middle that saw her lash the ball goalwards rather tamely was the highlight for the Aussies.
Just before the half hour mark, Brazil came close to opening the scoring, Formiga firing goalwards from 25 yards, unleashing a powerful top-corner bound effort that Williams did well to tip over the bar. It was the South American side who had taken control of the game, with Australia opting to play on the counter by slipping balls through for Heyman and Lisa De Vanna to run onto.
However, goal-mouth action was at a premium in the first 45 minutes, neither side able to conjure up much on the attack. The pace of Fabiana was thwarting Australia most of the time, with them looking to get at Brazil down the left but finding the right-back to be much quicker, getting to those through balls before their forwards and dealing with them effectively.
The defender had been booked early on in the game, so it made sense that the Matildas were looking to run at her, but she was rarely forced into making a challenge as she was first to the ball almost every time.
Wild efforts from Heyman, Tamires and Formiga brought to an end the first half, one in which both teams lacked conviction in their final balls which prevented them from causing problems in the final third. Marta had started to get involved more in the last few minutes, trying to make things happen herself due to the lack of opportunities, but she could not do it all regardless of her incredible talent. For both teams, the play needed to be quicker and the passing needed to be sharper if they were to break down two stubborn defences.
Australia would be looking to get more players forward too, with their attackers finding themselves isolated and outnumbered for the majority of the half as a result of a lack of options.
Despite what was lacking in the first-half, Brazil were positive from the off as good work from Cristiane saw her tee up Tamires in the box within 60 seconds of the restart, but the left-back dragged her shot wide of the mark from an angle.
However, this chance hardly proved a catalyst for the game to liven up, with the next chance of note not coming for another 10 minutes as Kerr lashed over from 10 yards from a corner, the ball bouncing just as she went to hit it, meaning she failed to make proper contact with the shot.
Foord was positive for Australia, constantly trying to inject pace into her attack by making runs forward from defence, but it remained Brazil who looked the most threatening as Marta broke down the left and forced a good save out of Williams, down low to her right. From the resulting corner, Formiga again came close as he header crashed against the bottom of the post before being cleared by Australia.
The Matildas broke from this, countering with pace as De Vanna raced away down the right before cutting back inside and teeing up the incoming Van Egmond, whose low strike from 20 yards deflected just wide of the mark.
In and amongst these mad, end-to-end few minutes, a change we have somewhat come to expect when watching Australia occurred, as Heyman made way for Simon, a substitution made in three of the Matildas' four games this summer now to keep the legs of their centre-forward fresh so their high-pressing game can continue. Katrina Gorry entered the fray soon after too, replacing Tameka Butt in midfield as Australia tried to swing the game in their favour during a good spell.
This worked exactly as planned too, Australia taking the lead in the game with 10 minutes to play. Both substitutes were involved, Gorry first threading De Vanna through on goal. Whilst she failed to beat Luciana with a poor finish, the goalkeeper spilled a tame effort straight at her into the path of Simon, who gambled and was able to tuck home the rebound clinically to give her side a huge chance of reaching the last eight.
Brazil opted to bring on Raquel Fernandes and Beatriz with seven minutes to go to try and get back into the game, but their only real chance to do so came from a free-kick that Cristiane headed into the arms of Williams with only a minute to play.
Brazil were granted just two minutes of added time to save their World Cup campaign, and Australia defended valiantly to see out the final moments, fighting for every ball and hanging on to their slender lead, with the referee's full time whistle coming to spark wild celebrations from the Matildas.
Their opponents, on the other hand, were reduced to tears, especially the goalkeeper Luciana who was at fault for the goal, though her defenders could have reacted quicker to the loose ball too. The fight and desire displayed by the Aussies earned them the win though, whilst Brazil failed to show their usual creativity and flair that allowed them to cruise through their group.
Perhaps this shows just how important the group stages are, with Australia having battled to get out of their 'group of death,' whilst Brazil easily earned maximum points. They were yet to be properly tested in the tournament and this showed as they failed to overcome a tough opponent in their first knockout match.
Australia's young side, however, are making remarkable progress, and the experience they are gaining will help them come on leaps and bounds over the next few years. Next up, they face either Japan or the Netherlands, who play at 3am on Wednesday morning (BST).