BANGKOK — 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, Naypyidaw, 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.