In a moment that will haunt Haziq, the 19-year-old punched a corner into his own net on 39 minutes, silencing 80,000 fans .
In a moment that will haunt Haziq, the 19-year-old punched a corner into his own net on 39 minutes, silencing 80,000 fans at the cavernous Shah Alam Stadium.
It proved the game's only goal and brought a tame end to another wildly successful day for Malaysia, who reached a record 140 gold medals to finish top of the table for the first time since 2001.
Haziq was the fall guy but the Thais were well worth their 1-0 half-time lead after Chenrop Samphaodi had curled a shot wide and Suriya Singhui saw a strong header saved by the goalkeeper.
Thailand also had an early penalty shout turned down and just prior to the own goal, Phicha Au-Tra narrowly failed to connect with a cross which trickled across the face.
After the break, Worachit Kanitsribumphen was twice denied by last-ditch defending from the Malaysians, while Sasalak saw a menacing shot go wide.
Malaysia were restricted to the odd attempt from distance before Danial Amier fizzed one over on 69 minutes and Syazwan Andik went close with a curling shot 12 minutes from time.
The men's football final was the last act of a bumper penultimate day, with 60 gold medals up for grabs and Malaysia taking 29 of them to reach an unbeatable 140 for the tournament.
Malaysia have amassed more than one-third of the 404 gold medals at the mini-Olympics, smashing their previous record of 111 and sealing top spot for the first time in 16 years.
Thailand trailed on 69 golds and Vietnam had 58, meaning the second and third-placed teams totalled less than Malaysia between them.
The biennial SEA Games, now in their 29th edition, have a well-worn tradition of allowing the hosts to tailor the sporting programme to suit their strengths, meaning they often finish top.
Some of Malaysia's results have faced scrutiny, including in boxing, sepak takraw and pencak silat, and the #ShameOnYouMalaysia hashtag has been used by critics online.
Thailand's delegation chief Thana Chaiprasit also took aim at the hosts when he said: "They organise sports they are good at and do not organise sports other countries are good at."
Since Malaysia last hosted and topped the SEA Games in 2001, their biggest tally has been 68 gold medals in 2007. Two years ago in Singapore they won 62, finishing fourth.
But Malaysia's haul of gold medals isn't outlandish for the SEA Games. In 2007 Thailand won 183 out of 477 on home soil, and in 2011 host nation Indonesia finished with 182 out of 554.
On Tuesday the home team had wins in badminton, sailing, diving, pencak silat, muay kick-boxing, speed skating and water ski and wakeboarding. Malaysia's polo team, which features the country's sports minister, also won gold.
The 11-nation Games, which have been running for about two weeks in and around Kuala Lumpur, will end with a closing ceremony following a limited programme on Wednesday.