Jack Lisowski in action.
Image credit: Eurosport
Thailand took the lead on three occasions and in the sixth frame they were two balls away from victory only for Noppon Saengkham to miss a crucial pink.
Kyren Wilson came to the table and then enjoyed a massive slice of luck when his attempt on the pink fluked into a different pocket.
In the decider Jack Lisowski beat Thepchaiya Un-Nooh to book England’s place in the semi-finals as they bid to win the World Cup for the first time since 1989.
Scotland are also into the last four after they held on to win a nervy encounter with Wales.
John Higgins and Stephen Maguire raced into a 3-1 lead but they were pegged back as three-times world champion Mark Williams won frame five before Wales then won a doubles frame.
Maguire and Ryan Day contested the deciding frame and it was the former who won out, helped in part by a break of 59.
Scotland will face the China A side of Ding Junhui and Yan Bingtao, after they hammered Hong Kong 4-0.
In the other semi-final England will face China B’s Zhou Yuelong and Liang Wenbo after they beat Belgium 4-2.
Stage 16, Lovere - Ponte di Legno (194km)
Greatest Tennis Players