The government of Thaksin Shinawatra was quick to dismiss as "crazy" reports in 2002 that Jemaah Islamiah (JI), an al-Qaeda affiliate, was operating from Thailand.
There was a shift in tone six months later, however, just before Thaksin was about to meet US President George W Bush at the White House. The government announced the arrest of community leader Waehamadi Wae-dao and two teachers at a private Islamic school in Narathiwat and claimed they had confessed to plotting to blow up foreign embassies in Bangkok with the help of Arifin Bin Ali, a JI operative from Singapore.
The three were subsequently freed due to lack of evidence, and there were allegations that their "confessions" had been extracted through torture. Critics noted the timing of the government's original announcement and suggested that Thaksin was merely currying Washington's favour.
This was not long after Bush responded to the 9/11 terrorist attacks by declaring, "Either you are with us or you are with the terrorists."
Then, in August 2003, "Asia's most wanted man" - Riduan Isamuddin, known as Hambali - was arrested in Ayutthaya. He was the mastermind behind the December 2002 Bali bombing that killed 202 people, mostly Australian tourists.
Last Thursday's horrific assault on Jakarta, reportedly carried out by terrorists linked to the Islamic State (IS), prompted Bangkok to emphasise better sharing of intelligence among governments in the region.
Deputy Prime Minister Prawit Wongsuwan said that, although IS affiliates might be operating in the region, their presence has not been detected in Thailand. At the same time national police chief Chakthip Chaijinda cautioned that, despite not being a member of the multinational coalition dropping bombs on IS positions in Syria and Iraq, Thailand is still at risk.
The implication is that some in Thailand do believe we are secure because our aircraft are not involved in the conflict in the Middle East.
It's safe to assume that the Islamic State hit Indonesia, the world's most-populous Muslim nation, because its government has taken a firm stance against IS and made concerted efforts to obstruct its recruitment practices locally.
Thailand in fact faces the same peril as a result of growing anti-Muslim sentiment in pockets around the country. This bigotry could be our undoing. Compounding the issue is the government's tendency to categorise the separatist insurgency in the Malay-speaking South as an "Islamic" problem, when the conflict is actually ethno-nationalist in nature and has no relation to Islam.
Thai nationalists stoke the risk by pushing to have Buddhism enshrined in the Constitution as the state religion, and residents of the North and Northeast by campaigning to prevent Muslims from building mosques.
By rendering the conflict in the southernmost provinces as religious in essence, we are simply inviting trouble from groups such as JI, al-Qaeda and IS.
The argument in favour of Buddhism becoming the state religion should be made on its own merits rather than though erroneous reference to the conflict in the historically contested southern provinces.
Indonesian President Joko Widodo's subtle response to the Jakarta attacks - subdued yet serious - was a good example for others in the region to follow. By stressing societal resilience, Joko demonstrated that there is more than one way to counter terrorism and radicalism, and it needn't be the military option.