A quality stoppage-time strike by Tom Rogic took Australia through to the knockout stages of the Asian Cup as they beat Syria 3-2.
The Socceroos were twice pegged back in Al Ain after Awer Mabil and Chris Ikonomidis scored.
A draw would have been enough to see Graham Arnold's side through but they secured their second straight victory when Rogic fired in from outside the area in the 93rd minute.
The holders will now face Uzbekistan or Japan in the round of 16 on Monday.
Australia, who had needed extra time to see off Syria in their two-legged clash in qualification for World Cup 2018, were given an early scare when Omar Khrbin dragged a low effort past the far post in the 13th minute.
Jamie Maclaren headed wide for Australia from Rhyan Grant's cross and was denied by keeper Ibrahim Alma's double save before the Socceroos went ahead on 41 minutes. Mabil struck a powerful curling effort with his left foot that gave Alma no chance, notching his fourth international goal.
The lead only lasted two minutes though with Khrbin poking home at the second attempt after Mat Ryan had parried his initial close-range header.
Ikonomidis squeezed the ball over the line nine minutes into the second half to convert Rogic's pass and make it 2-1.
Arnold's side were denied a two-goal cushion when Apostolos Giannou, having replaced Maclaren, took Mabil's pass and fired a fine low shot into the base of the post.
And 10 minutes from time Syria were level when they were awarded a penalty which Omar Al Soma converted.
Rogic's tremendous strike earned the three points for the Socceroos, taking them through in second spot.
Australia are 9/1 to win the Asian Cup. Meanwhile, Japan are 8/13 to win Group F and Uzbekistan 13/10.