The man suspected of being a top terrorist leader was planning to attack a meeting of world leaders in Bangkok, Thailand's prime minister has said.
Hambali is alleged to have links to al-Qaeda
Hambali, an Indonesian whose real name is Riduan Isamuddin, was arrested on Monday in the Thai city of Ayutthaya following a tip-off.
He is suspected of being the operations chief for Jemaah Islamiah (JI), a group allegedly linked to al-Qaeda and blamed for last year's Bali bombing as well as other attacks.
"He came here
for the purposes of mounting a terrorist attack," Thaksin Shinawatra said.
"He was not just using Thailand as a transit point."
Twenty-one world leaders
"The investigation uncovered an attack being planned for the Apec meeting."
The Asian Pacific economic co-operation (Apec) is meeting in Bangkok in October.
Twenty-one world leaders are due to attend, including US president George Bush.
Hambali is being held in US custody and a secret location.
Thai officials said he had been flown to Indonesia under US custody, although this was denied by Indonesian
"Right now we are in the process of interrogating him with the allied countries. I cannot say where," Mr Shinawatra said.
He said that Thai investigators had learned that Hambali had received money transfers while in Thailand to fund terrorist attacks.
Residents who witnessed Hambali's arrest told the Associated Press news agency that he had lived in the building for only two weeks.
Mr Shinawatra said the Apec meeting was a target
They said plainclothes officers smashed down the door of
his one-bedroom apartment and took him away after a struggle.
They described him as being a quiet neighbour.
JI is blamed for a string of bombings across the region, including Bali, and the attack on the Marriott hotel in Jakarta on 5 August, in which 13 people died.
"Hambali was one of the world's most lethal terrorists... He is no longer a problem to those of us who love freedom," said US President George W Bush in a speech to troops.
A senior Thai immigration police official told AFP news agency that Hambali
travelled into Thailand on a fake Spanish passport, and disguised himself by shaving his heavy beard.
JI: FINGER OF SUSPICION
Bomb attack on Marriott Hotel, Jakarta, 13 killed
Bali resort bomb attacks, 12 October 2002, 202 killed
Christmas Eve 2000 attacks on Indonesian churches, 18 killed
January 2001 attacks in the Philippines, 22 killed
Regional intelligence services believe that Hambali, aged about 40, has a seat on al-Qaeda's military committee and is the only representative from South East Asia.
He is thought to have been involved in some of the planning meetings for the 11 September attacks on the US, and to have been the brains and financial conduit behind the Bali attacks.
Hambali travelled to Afghanistan in the late 1980s where he is believed to have been recruited into al-Qaeda, and is thought to now act as a bridge between that organisation and JI.