Australia needed two late goals to come from behind and beat Iraq 2-1 in a vital World Cup qualifying victory.
Needing three points following a shock loss to Jordan last month, Australia found themselves trailing late on once more after Alaa Abdulzehra broke the deadlock on the counterattack in the 71st minute.
But Tim Cahill levelled with a trademark header from a corner with 11 minutes left in the match, and substitute Archie Thompson headed in the winner in the 83rd minute.
Coach Holger Osieck will have left the Al Arabi stadium relieved to have his first win in the group but knowing his team are still far from their best.
The win moves Australia on to five points from their four matches so far, five points adrift of runaway leaders Japan.
The Socceroos, who host three of their last four matches, sit in the second automatic qualification position, level on points with Oman who beat Jordan 2-1 in the earlier match, another to feature late drama.
Oman took a 62nd-minute lead through Ahmed Mubarak and then doubled the advantage in the 87th minute when Jumaa Darwish found the net. But there was still time for a late scare with Thaer Bawab pulling one back for the visitors in the final minute. The defeat leaves Jordan fourth on four points from as many matches.
In Group A, the 10 men of Iran beat South Korea 1-0 to draw level with their opponents on seven points.
Masoud Sojaei was dismissed in the 56th minute for a second bookable offence, but Iran shrugged that off to score the only goal through Javad Nekounam with 14 minutes to go.
Iran and South Korea are level at the top, two points clear of Uzbekistan who were 1-0 winners over Qatar earlier in the day, Sanjar Tursunov's 13th-minute goal enough for all three points.
Qatar and Lebanon have four points apiece in what now looks a very tight group.
Information from the Press Association was used in this report