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.
|Halep takes positives despite Dubai defeat|
|Reigning champion Van Uytvanck progresses in Budapest|
|Brough stars for Wakefield on milestone outing|
|Serbia progress in the balance with one game to go|
|DeMarcus Cousins blasts college basketball after Zion Williamson injury|
|UEFA explains ´technical issue´ behind Schalke-City VAR delays|
|Coric, Verdasco humbled in Open 13|
|Inter 4 Rapid Vienna 0 (5-0 agg): Nerazzurri cruise into Europa League last 16|
|Chelsea 3 Malmo 0 (5-1 agg): Sarri´s side stroll into last 16|
|Halep out, Kvitova dominant in Dubai|
|Marotta ´very optimistic´ Godin will join Inter|
|Emery praises Arsenal´s game management after European progress|
|Valencia 1 Celtic 0 (3-0 agg): Toljan sent off as Bhoys crash out|
|Arsenal 3 BATE 0 (3-1 agg): Emery´s men ease through|
|Woods to skip Honda Classic, play Arnold Palmer Invitational|
|Sarri recalls Hudson-Odoi for Malmo match|
|Silverwood in line for England job|
|WATCH: Norwegian goalkeeper scores stunning free-kick|
|Bencic ends Halep´s Dubai dreams|
|Playing conditions confirmed for The Hundred, reveals ECB|
|Manchester City fan suffered ´traumatic brain injury´ in alleged assault|
|Afghanistan too strong for Ireland in T20 opener|
|History-chasing Sri Lanka edge Proteas on day one|
|Tottenham an ´exciting and brilliant´ team, says Kanoute|
|Klopp fined £45,000 referee comments|
|Mourinho to analyse Clasico for beIN SPORTS|
|Ronaldo has won three Champions Leagues, not five – Atletico president Cerezo hits back at Juventus|
|Greatest Wales side ever? Not in my book, says Gatland|
|FA charge Millwall over racist chanting|
|Saiss signs new Wolves deal|
|Klopp impressed by Solskjaer´s ´brilliant job´ at United|
|De Jong excited to join ´greatest ever´ Messi at Barca|
|Gattuso ´not building anything´ at AC Milan|
|Manchester City fan in critical condition after alleged assault following Schalke game|
|Kovac wants repeat of Bayern´s defensive efforts|
|Semenya sets record straight over government funding for IAAF case|
|Tottenham´s Kane to be assessed ahead of Burnley clash|
|McIlroy to skip Irish Open|
|England rest Stokes and Buttler for Windies T20s|
|Lambert given two-game touchline ban after East Anglian derby fracas|
|Gatland puts faith in Anscombe to face England|
|PSG terminate Diarra contract|
|Nantes grant Cardiff extension over Sala payment, Warnock confirms|
|Horne replaces Russell for injury-hit Scotland in Paris|
|Eriksen´s agent ignoring transfer speculation|
|Moon and Nowell to start for England against Wales|
|PSG announce new shirt sponsor|
|Hearn expects Joshua-Usyk fight in 2020|
|Van Dijk wants to be a ´legend of Liverpool´|
|India lose Pandya for Australia T20s and ODIs|
|KNVB postpones Ajax game to boost Real Madrid preparations|
|Tigers land Rabbitohs flyer Jennings|
|Man United have new flow under Solskjaer - Wijnaldum|
|Manchester United v Liverpool: Herrera the unsung hero of resurgence|
|Manchester United v Liverpool: Alexander-Arnold gets chance to show growth at Old Trafford|
|Duke players, Coach K react to Zion Williamson’s knee injury|
|Barack Obama wishes Zion Williamson a ´speedy recovery´|
|CONCACAF Champions League Review: Santos Laguna hit Marathon for six|
|Morgan praises Root, Roy after record chase|
|LeBron sends best wishes to top NBA prospect Zion Williamson after injury|
|Schwartzman the latest seed to fall in Rio|
|Duke star Williamson suffers knee injury|
|Koke: VAR will give Morata a goal one day|
|´Everybody wants to actually talk about bull****´ – Irving angry over Durant video rumours|
|Ronaldo had a good game – Allegri backs Juventus star|
|We weren´t at our best – Tuchel after PSG´s 5-1 rout|
|LeBron James ready for Lakers´ playoff push|
|Allegri: Juventus not dead yet|
|Ronaldo: I´ve won five Champions Leagues, Atletico have zero|
|Machado picking Padres over White Sox might´ve been a mistake – Anderson|