Host nation Malaysia will play Indonesia, and holders Thailand will face Myanmar in Saturday's semifinals of the Southeast Asian Games (SEA) Games after the completion of Group B action on Thursday.
The Thais sealed their spot in the last four with a ruthless 3-0 victory over Vietnam.
Elsewhere, Indonesia's 2-0 victory over Cambodia booked them a last-four clash against Ong Kim Swee's Malaysia.
A controversial opener from Phitiwat Soojkitthummakul gave Thailand the lead on the stroke of half-time before Picha U-tra added a second. Vietnam then missed a penalty and Chenrop Samphaodi netted a third to put the game beyond their opponents.
It was a sweet end to a difficult group stage for the holders, who had previously failed to impress. In contrast, it was a bitter disappointment for the Vietnamese, who had started the tournament so well. The two points dropped against 10-man Indonesia on Matchday Four proved crucial in the end.
Phitiwat opened the scoring in added time in the first half after an indirect free kick was awarded just 12 yards from goal when goalkeeper Minh Long handled a back pass. It was a controversial one as Tuan Anh could argue that his interception was not intended as a back pass. But the award stood and Sasalak Haiprakhon stroked the ball to Phitiwat, who slammed the ball through the mass of bodies and into the corner.
Worse was to come for Vietnam's goalkeeper after the break. Picha added a second for the Thais in the 52nd minute after a horrendous collision between Minh Long and Van Thanh allowed Worachit Kanitsribumphen to run through on goal. He unselfishly rolled the ball into the path of Picha who stroked it into an empty net to put the holders in control.
However, in the 66th minute, Ratthanakorn Maikami gave Vietnam the perfect opportunity to get back into the game with an extremely rash tackle on Quang Hai in the penalty box. But the pressure got to Cong Phuong who blazed the spot kick high over the bar.
And Vietnamese misery was soon compounded by a third goal for Thailand. Chenrop ran onto a long crossfield ball, held off a challenge, and fired low into the net from a narrow angle.
The win keeps the Thais on course for a third successive SEA Games gold medal.
Indonesia edged to a 2-0 win over 10-man Cambodia to secure their place in the last four.
Pisa Chom received a second yellow just before the break with the teams still tied at 0-0. Luis Milla's side took advantage and goals from Ezra Walian and Febri Haryadi proved enough to give them the necessary three points to take them above Vietnam in second place.
Saturday's semfinals will decide who will play the gold medal match at Bukit Jalil National Stadium next Tuesday.