Myanmar and Bangladesh have signed an initial deal for the possible repatriation of hundreds of thousands of Rohingya Muslims who fled violence in Rakhine state.

More than 620,000 Rohingya have crossed the border into Bangladesh since August, running from a military crackdown that Washington said this week clearly constituted ethnic cleansing.

Rights groups have raised concerns over the repatriation process, including where the persecuted minority will be resettled since hundreds of their villages have been razed, and how their safety will be ensured in a country with raging anti-Muslim sentiment. Some aid workers fear they could be forcibly interned.

The signing took place after a meeting between Myanmar’s de facto leader, Aung San Suu Kyi, and the Bangladeshi foreign minister, Abul Hassan Mahmood Ali in Myanmar’s capital, Naypyidaw.

In brief remarks to the press,Mahmood Ali said: “This is a primary step. [They] will take back [Rohingya]. Now we have to start working.”

A joint working group will be set up within three weeks and an arrangement for repatriation “will be concluded in a speedy manner”, the Bangladeshi foreign affairs ministry said in a statement. The return of the refugees should start within two months, it added.

Myanmar said the deal was based on a 1992/93 repatriation pact between the two countries that followed a previous spasm of violence.

Myint Kyaing, the permanent secretary of Myanmar’s ministry of labour, immigration and population, said his country would accept people with identity documents issued by governments in the past.

Refugees would have to fill in forms with names of family members, previous addresses in Myanmar, birth dates and a statement of voluntary return.

“We are ready to take them back as soon as possible after Bangladesh sends the forms back to us,” he said.

The requirements for identification documents has been a contentious issue for the stateless Rohingya. Amnesty International released a report this week accusing Myanmar of effectively denying citizenship to Rohingya on the basis of their ethnicity, including engaging “in an active policy of depriving Rohingya of vital identity and residency documentation”. This includes blocking newborn babies from household lists, it said.

The London-based rights group said this week that Rohingya lived under state-sponsored, institutionalised discrimination that amounted to apartheid.

Q&A Who are the Rohingya and what happened to them in Myanmar? Show Described as the world’s most persecuted people, 1.1 million Rohingya people live in Myanmar. They live predominately in Rakhine state, where they have co-existed uneasily alongside Buddhists for decades. Rohingya people say they are descendants of Muslims, perhaps Persian and Arab traders, who came to Myanmar generations ago. Unlike the Buddhist community, they speak a language similar to the Bengali dialect of Chittagong in Bangladesh. The Rohingya are reviled by many in Myanmar as illegal immigrants and suffer from systematic discrimination. The Myanmar government treats them as stateless people, denying them citizenship. Stringent restrictions have been placed on Rohingya people’s freedom of movement, access to medical assistance, education and other basic services. Violence broke out in northern Rakhine state in August 2017, when militants attacked government forces. In response, security forces supported by Buddhist militia launched a “clearance operation” that ultimately killed at least 1,000 people and forced more than 600,000 to flee their homes. The UN’s top human rights official said the military’s response was "clearly disproportionate” to insurgent attacks and warned that Myanmar’s treatment of its Rohingya minority appears to be a "textbook example” of ethnic cleansing. When Aung San Suu Kyi rose to power there were high hopes that the Nobel peace prize winner would help heal Myanmar's entrenched ethnic divides. But she has been accused of standing by while violence is committed against the Rohingya. In 2019, judges at the international criminal court authorised a full-scale investigation into the allegations of mass persecution and crimes against humanity. On 10 December 2019, the international court of justice in The Hague opened a case alleging genocide brought by the Gambia. Rebecca Ratcliffe Photograph: Tracey Nearmy/AAP

Bangladesh has been overwhelmed by the influx of people, with crowded refugee camps growing drastically in the southern Cox’s Bazar region.

Myanmar will hope to ease growing international pressure by striking the agreement. Pope Francis, who has spoken about his sympathy for the plight of the Rohingya, is due to visit both countries next week.

Aung San Suu Kyi’s office released a statement on Thursday appearing to condemn western countries and the Organisation of Islamic Cooperation for having “portrayed the matter as an international issue by passing resolutions at the UN human rights council and the general assembly of the United Nations”.

The statement said Myanmar’s “principled position” was that “issues that emerge between neighbouring countries must be resolved amicably through bilateral negotiations”.

“The present arrangement, which had been agreed to by both countries based on their friendly and good neighbourly relations demonstrate the steadfast position of Myanmar and is a win-win situation for both countries,” it said.

The Rohingya have been the target of communal violence in mainly Buddhist Myanmar for years. The governmentseverely restricts their movement and access to basic services.

The latest unrest erupted after Rohingya rebels attacked police posts on 25 August. The army backlash inflicted violence across northern Rakhine, with refugees recounting scenes of soldiers and Buddhist mobs slaughtering villagers and burning down entire communities.

The military denies all allegations but has restricted access to the conflict zone. The Myanmar government has blocked visas for a UN-fact finding mission tasked with investigating allegations of military abuse.

Reuters and Agence France-Presse contributed to this report.