Egypt has released 233 Sudanese migrants detained after security forces broke up a camp of protestors in a Cairo square last month, the U.N. refugee agency said Thursday.

Egypt also would release another group of 39, said Radhouane Nouicer, regional deputy director for the U.N. High Commissioner for Refugees.

The 233 Sudanese released Wednesday night were part of a group of more than 2,000 people who were violently removed from a Cairo square near UNHCR's office after a three-month demonstration, the refugee agency said.

Security officials said 25 migrants died, including women and children, in the Dec. 30 expulsion by Egyptian police armed with clubs. International and local rights groups accused the police of unnecessary brutality. The Interior Ministry blamed the violence on the squatters' refusal to leave and said that more than 70 police officers were wounded.

The migrants were protesting what they saw as a UNHCR failure to resettle them.

Most of the demonstrators initially detained were released within a few days, but more than 600 were still being held as of Jan. 5, when the agency was given access to the Sudanese in three Cairo prisons to assess their legal status and their need for international protection, UNHCR said.

The agency subsequently recommended the release of all detainees, about two-thirds of whom are registered with UNHCR or are women and children or who have fled Sudan's embattled Darfur region.

Last week, police released 164 detained Sudanese migrants on UNHCR's recommendation because they were registered with it as refugees or asylum seekers.

The U.N. agency said 183 Sudanese are still detained and it asked for more time to determine their proper legal status.

"The government of Egypt has given UNHCR until Jan. 26 to continue its legal assessments," the agency said. "UNHCR is hopeful that no deportations will take place for this group."

Egypt has long offered Sudanese a haven from the conflicts that have ravaged their country. About 30,000 Sudanese are registered as refugees in Egypt, and estimates of Sudanese living in the country have ranged from 200,000 to several million.

The migrants do not want to return to Sudan. UNHCR found that many of those in the park did not qualify as political refugees and were economic migrants. The agency says it promised the migrants more assistance in Cairo after "hundreds of hours" of negotiations with the squatters' leaders, but could not offer them resettlement to another country.

Under the 1951 U.N. Refugee Convention, which Egypt has signed, genuine refugees cannot be returned home without their agreement. A total of 146 countries have signed the treaty.