Australia reached the final stage of Asia's 2014 World Cup qualifying with a 1-0 win in Bangkok on Tuesday but they were made to work for their victory by a gutsy Thailand.
A second-half goal from Brett Holman was enough to give the Socceroos three points from a scrappy performance and take them through with 12 points from five games.
Australia were keen to reassert themselves after losing their 100 percent win record in Friday's shock 1-0 defeat to Oman, but they rarely gelled against a Thai side who put on a fighting display for their fans.
A near-capacity crowd at Supachalasai National Stadium, used instead of the normal Rajamangala venue which is occupied by refugees from Bangkok's crippling floods, provided buoyant support for the home team.
And Thailand marginally shaded the first half as Australian left-back Michael Zullo endured a torrid evening against the pace and aggression of winger Suree Sukha.
Thailand wasted two good chances to score in the first half, both coming from diagonal balls behind Zullo.
Suree waltzed past the defender after quarter of an hour only to see his centre pass blasted over, before committing an even worse miss himself 20 minutes later.
Another ball in behind Zullo put him through on Mark Schwartzer, but with only the Fulham stopper to beat Suree lost his head and fired over the bar when it seemed easier to score.
At the other end, goalkeeper Sinthaweechai Hathairattanakool was equal to anything Australia's burly strikeforce could throw at him, saving well from two Josh Kennedy headers and calmly claiming a number of crosses under pressure.
The visitors picked up five yellow cards and looked in danger of losing their cool on a sultry night in Bangkok, with Brett Emerton berating team-mate Matt McKay after a first-half mix-up led to a pass going into touch.
But with 15 minutes to go, a cross from former Blackburn man Emerton on the right found Holman unmarked six yards out and he made no mistake with the header.
Australia now join Asian champions Japan, Uzbekistan and Jordan in the final round of qualifying.
The Socceroos' German coach Holger Osieck insisted he was not disappointed with his side's performance against a side 94 places below them in the world rankings.
"I think it was a hard-fought victory. I think we played good enough to win the game," he said.
And he paid tribute to the Thailand team, who Australia also struggled to beat at home in September.
"I think they played very well in both games and although we had a tough game in Australia, today they were even stronger."
Australia face Saudi Arabia at home in the last round of matches on February 29 knowing they are certain to top the group, but Osieck said he owed it to the fans to field a full-strength side, including Europe-based players.