Thailand has suspended plans to forcibly repatriate 153 Hmong refugees to Laos, after the US and other Western countries agreed to take them.
Some 9,000 Hmong refugees from Laos live in Thailand
The refugees had been resisting efforts to send them back, saying they face persecution at home.
Fifty-four men had locked themselves into their detention centre in a border town in northern Thailand.
The US, the UN and international human rights groups have criticised Thailand's repatriation plan.
The 153 refugees were arrested in Bangkok two months ago. They were later taken to the Nong Khai detention centre on the Thai Laos border, pending deportation.
The UN refugee agency, UNHCR, has said the Hmong's forcible return would be "a major breach of international law".
The US ambassador to Thailand, Ralph Boyce, said he had urged Bangkok to allow the refugees "to be resettled in another country where they will be safe".
Some Hmong continue to fight against the government
Later the Thai foreign ministry said the deportation had been put on hold indefinitely after the US, Canada, Australia and the Netherlands had given assurances that they would take the Hmong.
The Hmong are a minority hill tribe people whose members fought alongside the US against communist forces in Laos in the 1960s.
Groups of Hmong fighters still remain in the Lao jungle, where they fled after the communists took over the country in 1975 .
They are still said to clash occasionally with Lao government forces.
Up to 9,000 Hmong immigrants live in Thailand, which has been trying to work out a long term solution with Laos.