Myanmar and Bangladesh said Thursday that they had moved one step closer to the possible repatriation of hundreds of thousands of Rohingya who have fled Myanmar for Bangladesh over the past three months.

More than 620,000 Rohingya, a mainly Muslim ethnic minority in Myanmar, have flooded into Bangladesh, escaping what the United States on Wednesday termed “ethnic cleansing” by Myanmar’s security forces.

“The first step of the repatriation process has been done,” said Foreign Minister Abul Hassan Mahmood Ali of Bangladesh, after going to Myanmar’s capital, Naypyitaw, to meet with officials there.

But even as the two countries announced they had signed an “arrangement” on returning displaced Rohingya to Rakhine state in Myanmar, the fractious and uncertain nature of the accord overshadowed the news. Neither side gave many details, apart from a vague commitment to beginning a repatriation process within two months’ time.

While Myanmar has pushed for the return of any Rohingya to be conducted bilaterally, the Bangladeshis have called for international agencies to be involved.

Earlier, the Myanmar authorities said they would, in principle, allow for the return of displaced Rohingya if they could prove that they had lived in Myanmar before fleeing across the border over the past three months.

Ali, who in September accused Myanmar’s military of killing thousands of Rohingya, said he would not divulge the terms of any accord until Saturday. But he put the onus of responsibility on Myanmar.

Refugees pouring into Bangladesh from Rakhine, in Myanmar’s west, have described civilians being executed, women gang-raped and villages razed by fire.

“Since their houses are burned and destroyed,” Ali said, “they need to be rebuilt.”

Myanmar authorities have in recent weeks balked at the possibility of the Rohingya, whom they consider to be illegal immigrants from Bangladesh, returning to their native villages. Instead, Myanmar’s government has spoken obliquely of camps where they might be sequestered.

Other serious obstacles remain to any repatriation. For one, it’s not clear whether Myanmar’s military, which largely succeeded in ridding a Buddhist-majority country of a hated Muslim minority, would accept a proof of their residence if returning Rohingya were even able to offer it. Many fled without any papers. Others never had any.

Almost all Rohingya are stateless, stuck in an official netherworld between the two countries.

It’s also not certain whether the vast majority of Rohingya would want to return to a place where the security forces have unleashed what the United States and others have labeled crimes against humanity.

“I will never go back home,” said Mohamed Rafique, a Muslim cleric who arrived in a refugee camp in Bangladesh in September. “How can I go back to a place where they want to kill me?”

Bangladesh, itself poor and overcrowded, is struggling to cope with the influx, which has created on the country’s eastern flank one of the world’s largest refugee camps.

The latest surge of refugees began after Rohingya militants attacked Myanmar security outposts in late August. A previous strike by Rohingya insurgents a year ago also sent around 100,000 refugees to Bangladesh.

Meanwhile, Senior Gen. Min Aung Hlaing, commander in chief of Myanmar’s military, said in a statement last week that “it is impossible to accept the number of persons proposed by Bangladesh.”

He also raised doubts about any repatriation process, saying that it had to be “acceptable” to ethnic Rakhine Buddhists who have been accused of aiding in pogroms against the Rohingya.

“Emphasis must be placed on the wishes of local Rakhine ethnic people who are real Myanmar citizens,” said an English statement on the military commander’s Facebook page, before warning that any “unacceptable situation” could lead to “political instability.”