Nigeria came from behind to defeat Australia, leaving the co-hosts fighting for a place in the final 16 of the Fifa Women’s World Cup.
Emily van Egmond converted Caitlin Foord’s feed to give Australia the lead.
Nigeria quickly equalized, however, thanks to Uchenna Kanu’s clinical finish, before Osinachi Ohale’s header made it 2-1.
Despite Kennedy’s late goal, Nigeria held on after Asisat Oshoala scored following a mix-up between Australia’s Alanna Kennedy and Mackenzie Arnold.
Nigeria has moved to the top of Group B, tied on four points with Canada, while Australia is a point behind both before the section’s final fixtures on Monday.
Australia faces Olympic winners Canada in Melbourne and may require a win to go to the knockout stages, while Nigeria faces the already-eliminated Republic of Ireland in Brisbane.
Nigeria pulls off one of the tournament’s biggest upsets.
Australia, rated 10th in the world, would have advanced to the knockout stages with a win, but in the end, they were desperately trying to force an equalizer against a team placed 30 places lower.
Kennedy headed in a corner from Kyra Cooney-Cross in the 10th of 11 extra minutes at the end of the second half as the bulk of the 49,156-strong crowd at Brisbane Stadium cheered them on.
Australia, however, did not have enough time to score a dramatic equalizer as Nigeria clung to their slim lead, with some of their players in tears at the final whistle.
Australia and New Zealand are hosting the competition, and the two co-hosts have won one and lost one of their first two matches. Both are likely to need to win their final group games to remain in the tournament, however draws may be sufficient depending on other events.
Australia will be wondering how they went so wrong against a Nigerian team that did not have a single shot on or off target in the first 40 minutes.
Indeed, the Matildas produced 28 chances in all, compared to 11 for Nigeria, and had 15 corners to their opponents’ two.
Australia took the lead in first-half injury time, despite being without injured Chelsea striker Sam Kerr, but the lead lasted only five minutes as Kanu finished calmly after Rasheedat Ajibade’s pass was diverted into her path.
Nigeria took the lead thanks to Ohale’s daring header, which saw her accidently poked in the ribs by Kennedy as she headed in from close range, before Barcelona striker Oshoala scored wonderfully from a tight angle.
Kennedy had mistakenly headed the ball past her own goalkeeper and into the path of Oshoala.
As Kennedy headed over and Alex Chidiac fired too high, Australia put up the pressure. Kennedy then scored with goalie Arnold up for a corner to give the home team hope, but Nigeria held on for the three points.