Thailand's War Elephants storm into World Cup qualifying final round
Goals in each half from Mongkol Tossakrai and Adisak Kraisom ensured that Southeast Asia has a representative in the closing stages for the first time since 2002 and also secures Thailand a place at the 2019 Asian Cup.
Needing just a point, it was a tense 90 minutes at times with Thailand often on the backfoot against the 2007 Asian Champions, who missed a number of chances.
Iraq made most of the first half running on a poor pitch. On the half hour, goalkeeper Kawin Thamsatchanan got down well to push a low shot away to safety and seven minutes later, he was diving to his left to catch a Younis header.
Five minutes before the break, however, the War Elephants took a giant step towards the final round.
Mongkol Tossakrai rose high at the near post to head a left-sided corner from Theerathon Bunmathan firmly into the net past veteran goalkeeper Noor Sabri.
Just before the break Dhurgam Ismail fired over from a good position inside the area.
Iraq, needing a win, were becoming increasingly desperate but made the breakthrough midway through the second half as Mahdi Kamil scored from close range as, for once, Kawin was unable to hold on to the fierce Iraqi shot.
The Lions of Mesopotamia were streaming forward and a second was surely on the cards but with just six minutes left, Thailand restored their lead thanks to substitute Adisak Kraisom stealing in at the far post.
A 94th minute own goal robbed Thailand of victory, but it mattered little as the final whistle heralded wild celebrations from the visitors.