Tom Rogic smashed home a stoppage-time winner to hand Australia an undeserved 3-2 win over Syria and dump Fajer Ibrahim's men out of the Asian Cup in heart-breaking fashion.
Omar Al Soma looked to have given Syria a point, and hope of qualification, when he won and then converted an 80th-minute penalty but Rogic had the final say with a stunning left-foot drive that flashed past Ibrahim Alma with virtually the last kick of the game.
Earlier, Awer Mabil and Chris Ikonomidis twice put Australia ahead only for Omar Khrbin and Al Soma to cap a spirited Syria display with equalisers.
Rogic's late intervention meant Syria finished bottom of Group B with Australia second.
Australia looked nervous in the early stages with Syria wasting two chances to claim a surprise lead.
Al Soma headed a right-wing cross from Mohammed Osman over the bar before a weak clearance from Mat Ryan offered Khrbin an opportunity he squandered by shooting wide of the left-hand upright.
Referee Cesar Arturo Ramos then twice came to Australia's rescue, waving away Syrian penalty shouts after Al Soma tangled with Mark Milligan in the box and ruling out a goal from the striker for a foul on the Socceroos captain.
In between, Jamie Maclaren flashed a header across goal after great work from Rhyan Grant.
That opportunity was the first hint of Australia finding a foothold in the game and they continued to offer a greater attacking threat, Maclaren seeing two efforts parried by Alma before Omro Al Midani had to hack a Mabil effort off the line.
Mabil, born in a Kenyan refugee camp, continued his rise to prominence with a wonderful opener four minutes before the break, cutting in from the right and curling a left-footed shot beyond Alma.
If the Australia supporters inside the Khalifa bin Zayed Stadium thought that goal would have an adverse effect on Syria they were sorely mistaken as they levelled inside two minutes.
Mouaiad Al Ajaan delivered a pin-point cross ball from left that Khrbin powered home at the second attempt after Ryan had parried his initial header.
Australia regained the lead nine minutes into the second half - Rogic's in-swinging ball from the right flank eluding the Syria defence with Ikonomidis just managing to get enough on his finish to prevent Al Midani from completing another spectacular clearance.
There were more shouts for a penalty when Milligan, whose display will give coach Graham Arnold nightmares, allowed a routine pass to deflect off his boot on to his arm while, at the other end, Australia substitute Apostolos Giannou crashed a shot against the inside of the post.
Australia's luck finally ran out with 10 minutes to go, Ryan punching clear a Khrbin free-kick but when the ball was returned into the area, Milos Degenek fouled Al Soma and the striker coolly converted.
Syria sensed their chance and poured forward in search of a winner but were caught by the classic sucker-punch, Ikonomidis finding Rogic who lashed home superbly.
What does it mean? Australia must improve
Australia advance behind Jordan, who played out a goalless draw with Palestine. Arnold will be pleased to have got through but his team will have to perform much better if they are to go deep in the tournament.
Rogic shows class
Rogic's inclusion in the Australia squad prompted howls of indignation from some Scottish football pundits but the Celtic midfielder showed exactly why he is key to the Socceroos with a composed display in midfield that saw him set up Ikonomidis' goal before his superb late winner.
Milligan a mistake waiting to happen
While Rogic was calm and measured, the same cannot be said for Australia captain Milligan who produced an error-strewn performance.
Australia advance to a meeting with the runners-up of Group F, either Uzbekistan or Japan, on January 21, while Syria return home.
|Mbappe wanted Madrid but PSG convinced him to stay – Emery|
|Pelinka: Lakers can win NBA championship next year|
|Three-time F1 champion Niki Lauda dies aged 70|
|Pochettino or Sarri for Juve? We´ll see – Lippi|
|Buccaneers release McCoy after nine seasons|
|England want to leave Europe and they´re in two finals – Mancini jokes about Brexit|
|Raptors star Leonard ´will be ready´ to face Bucks – Nurse|
|Iguodala out of Game 4 against Trail Blazers|
|Allegri inducted into Italian Football Hall of Fame|
|Steelers QB Roethlisberger ´genuinely sorry´ for Brown comments|
|Mets´ Cespedes fractures ankle in ranch accident|
|Italy remain at top table, Great Britain rally to relegate France|
|Guardiola convinced Kompany´s destined to return to Manchester City|
|Yastremska sets up Stosur clash in Strasbourg|
|Anderson stars for Lancashire on return from injury|
|Ebden and Seppi shocked in Geneva, Humbert shines at Lyon Open|
|AFC Champions League Review: Spain great Xavi ends playing career with defeat|
|Bernardo Silva makes Champions League pledge after winning Man City award|
|Henin impressed by Halep ahead of French Open defence|
|I love you, I´m out - Departing Kompany has his mic-drop moment in City´s trophy parade|
|Abelardo opts to leave post as Alaves coach|
|Magic Johnson points finger at Pelinka after Lakers power struggle|
|Junaid deletes inflammatory tweet following World Cup squad omission|
|Bosz: Champions League improves chances of keeping Brandt & Havertz|
|PSG insist Mbappe will stay despite forward´s ´new project´ comments|
|Former Salford forward Turgut hospitalised with ´severe injuries´|
|Potter takes over as Brighton and Hove Albion boss|
|Ancelotti happy at Napoli amid Juventus links|
|Hemel Stags on course for Ottawa relocation, New York club a work in progress|
|Nadal overtakes Federer´s top-10 streak|
|Omitting Wahab and Amir would have been foolish - Inzamam|
|Scotland appoint Kilmarnock boss Clarke|
|I´ll keep my place if Pogba arrives at Madrid – Kroos|
|Kroos: Madrid struggles ´normal´ after Champions League dominance|
|Pogba, Hazard and Mbappe in, Bale and Isco out? - Real Madrid set for busy close-season|
|Double amputee Monger stunned by Grand Prix de Pau triumph|
|Walter to take over Stuttgart from next season|
|Giannis expects Milwaukee to buck their ideas up after Game 3 loss|
|Bolivian FA confirms death of referee Victor Hugo Hurtado|
|Australia opener Burns leaves Lancashire for personal reasons|
|Record-breaking female driver Chadwick lands Williams development chance|
|Semedo cleared of concussion to boost Barcelona|
|Iguodala questionable for Game 4|
|Neymar should not captain Brazil at Copa America - Edmilson|
|Wahab, Amir and Asif named in final Pakistan World Cup squad|
|Bale staying at Madrid impossible as Zidane is ´not keen´ - Calderon|
|Kroos agrees Real Madrid extension to 2023|
|Gundogan to renew contract talks with Manchester City|
|Folau opts not to appeal against Rugby Australia ban, still considering options|
|Nadal clear French Open favourite – Djokovic|
|Nedved: No Juve decision amid Sarri and Inzaghi links|
|Gil Marin: We need players totally committed to Atletico|
|Gardner´s big game helps Yankees pull away from Rays|
|This is playoff basketball – Leonard on playing through injury in Raptors win|
|Second most NRL games and 99 tries – Cronk´s career in Opta numbers|
|Spieth: I´m almost back at my best|
|Three takeaways from Raptors´ key Game 3 win over Bucks|
|Trail Blazers star Lillard addresses rib injury|
|Raptors top Bucks in double-OT thriller|
|MLS Review: Nani brace lifts Orlando, Galaxy stunned by Rapids|
|Cronk: It´s been one hell of a ride|
|Johnson upbeat despite falling short|
|Koepka holds on at US PGA – how a dramatic back nine unfolded at Bethpage Black|
|´Phenomenal´ and ´mind-blowing´ – Koepka basks in US PGA triumph|
|NRL great Cronk to retire at season´s end|
|Kevin Muscat to leave Melbourne Victory|
|Bethpage wobble does little to deny Koepka´s status as golf´s dominant major force|
|Brooks Koepka´s timeline of major dominance following US PGA triumph|
|Koepka relieved to retain US PGA title after ´stressful´ finish|
|Allegri seeking a challenge, not a sabbatical|