(CNN) -- Myanmar will allow Rohingya refugees back into the country if they can prove that they are Bengali, Thailand's foreign ministry said.
A photograph released by the Thai navy shows a group of men captured on December 12.
The agreement was reached in side talks between the Thai and Myanmese foreign ministers during the 14th ASEAN summit, a meeting of Southeast Asian nations held in Thailand over the weekend, said Thai Foreign Ministry spokesman Thairit Charungwat on Monday.
Thousands of Rohingya refugees -- a Muslim minority group from Myanmar -- have fled to Thailand over the years, saying they are persecuted by Myanmar's hard-line military government.
In recent months, controversy has erupted as the Thai military has been accused of intercepting boatloads of Rohingya, sabotaging their vessels and abandoning them at sea. Thailand eventually acknowledged such actions, after initial denials.
About 20,000 Rohingya migrants already live in Thailand, according to its foreign ministry, which says Thailand is being inundated.
The refugees -- who lack documentation -- live on the fringes in Thailand and Myanmar. But in Myanmar, "things like forced relocation, forced conscription, forced labor -- these things are exacerbated for the Rohginyas," said Benjamin Zawacki of Amnesty International.
"In addition to that, they suffer from what is really systemic discrimination, systemic persecution. Things, for example, like not being able to marry outside their ethnicity, very strict restrictions on movement, the inability to work for the government, to hold jobs as civil servants. They are summarily disenfranchised. They are not able to vote. They are not even held to be citizens."
The latest group of 78 Rohingya boat people, who arrived Thailand a month ago, has been detained there. Some of the 78 have required medical treatment, after being abused by the Myanmese navy, they say.
"They will have to be sent back, according to our law," Thailand's Prime Minister Abhisit Vejjajiva told CNN. "They are entering the country illegally." Watch CNN's "The Forgotten People" on Rohingyas' escape to Thailand »
Myanmar says it will take refugees back if they can prove that they are Bengali, a recognized ethnic group in Myanmar. Proof would include confirmation by relatives, a standard practice in a country that often lacks documentation. But the refugees have resisted being returned to Myanmar, saying they would be killed.
"At least this issue is being raised at international and regional level," Charungwat said. "Myanmar has also started to establish communication and participation on this issue, and join with ASEAN, as it is a regional issue to be solved."