The win saw Thailand qualify for the seventh straight FIFA Futsal World Cup, to be held in Uzbekistan in September.
Iraq flew out of the blocks with Salim Faisal driving home a goal inside the first three minutes before a mistake by the hosts saw the Iraqis double their lead. An errant pass from Thai goalkeeper Arut Sembat, who had ventured up towards the halfway line, was intercepted by Tareq Zeyad, who calmly slotted into an empty net to make it 2-0 in the 15th minute.
Thailand’s Alongkorn Janphon reduced the arrears three minutes later, before Thailand had Apiwat Chaemcharoen sent off as Iraq went to the break with a 2-1 lead.
Things went from bad to worse for Thailand as its star player Muhammad Osamanmusa was also dismissed early in the second half, but Alongkorn was up to the challenge, scoring a second goal to square things up at 2-2 in the 31st minute.
Therdsak Charoenphong sealed the win for Thailand with a long-distance shot in the 39th minute.
Speaking pre-match, Thailand coach Miguel Rodrigo said that the hosts would be buoyed by the backing of a large and vocal crowd inside the Hua Mark Indoor Stadium, and they fed off that energy to grab a late winner through Therdsak in a famous night for Thai futsal.
Thailand will play Tajikistan in the semi-final round on Friday at the same stadium. Fans can watch it live from 6pm via T Sports channel 7.