DHAKA (Reuters) - Bangladesh and Myanmar have agreed to take help from the U.N. refugee agency to safely repatriate hundreds of thousands of Rohingya Muslims who had fled violence in Myanmar, Bangladesh said on Saturday.

Rohingya refugees wait at a relief centre after crossing the Bangladesh-Myanmar border in the Teknaf area, Bangladesh, November 23, 2017. REUTERS/Susana Vera

More than 600,000 Rohingya sought sanctuary in Bangladesh after the military in mostly Buddhist Myanmar launched a brutal counter-insurgency operation in their villages across the northern parts of Rakhine State following attacks by Rohingya militants on an army base and police posts on Aug. 25.

Faced with a burgeoning humanitarian crisis, the two governments signed a pact on Thursday agreeing that the return of the Rohingya to Myanmar should start within two months.

Uncertainty over whether the United Nations High Commissioner for Refugees (UNHCR) would have a role had prompted rights groups to insist that outside monitors were needed to safeguard the Rohingya’s return.

Addressing a news conference in Dhaka, Bangladesh Foreign Minister Abul Hassan Mahmood Ali gave assurances that the UNHCR would play some part.

“Both countries agreed to take help from the UNHCR in the Rohingya repatriation process,” Ali said. “Myanmar will take its assistance as per their requirement.”

The diplomatic breakthrough came just ahead of a visit by Pope Francis to Myanmar and Bangladesh from Nov. 26 to Dec. 2 that is aimed at promoting “reconciliation, forgiveness and peace”.

While the violence in Rakhine has mostly ceased, Rohingya have continued to stream out of Myanmar, saying they have largely lost access to sources of livelihood such as their farms, fisheries and markets.

Thousands of Rohingya, most of them old people, women and children, remain stranded on beaches near the border, waiting for a boat to take them to Bangladesh.

FROM CAMP TO CAMP

Ali said a joint working group, to be formed within three weeks, will fix the final terms to start the repatriation process.

After leaving the refugee camps in Bangladesh, Rohingya who opt to be voluntarily repatriated will be moved to camps in Myanmar, the minister said.

“Most houses were burnt down. Where they will live after going back? So, it is not possible to physically return to their homes,” Ali said.

Myanmar officials have said returnees will be moved to camps only temporarily while so-called “model villages” are constructed near their former homes.

Win Myat Aye, the minister for social welfare, relief and resettlement who heads a Myanmar government panel on rehabilitation in Rakhine, said India and China had offered to provide “modular houses” for returnees.

The U.N. and the United States have described the Myanmar military’s actions as “ethnic cleansing”, and rights groups have accused the security forces of committing atrocities, including mass rape, arson and killings.

The United States also warned it could impose sanctions on individuals responsible for alleged abuses.

Led by Nobel peace prize winner Aung San Suu Kyi, Myanmar is in the early stages of a transition to democracy after decades of military rule. But civilian government is less than two years old, and still shares power with the generals, who retain autonomy over matters of defense, security and borders.

The commander of Myanmar’s armed forces, Senior General Min Aung Hlaing, has denied that soldiers committed any atrocities.

On Friday he met China’s President Xi Jinping in Beijing having been told earlier in the week by a top Chinese general that China wanted stronger ties with Myanmar’s military.

Under the deal struck with Bangladesh, Myanmar agreed to take measures to see that the returnees will not be settled in temporary places for a long time.

Myanmar plans to issue them an identity card on their return, although most Rohingya have so far rejected a scheme to give them “national verification cards”.

While the agreement says Bangladesh would seek the U.N. refugee agency’s assistance on the process, Myanmar - which has largely blocked aid agencies from working in northern Rakhine since August - only agreed “that the services of the UNHCR could be drawn upon as needed and at the appropriate time”.

Win Myat Aye told Reuters on Saturday that Myanmar would discuss “technical assistance” with the UNHCR, but had not reached a formal agreement with the agency.

There were already hundreds of thousands of Rohingya refugees in Bangladesh before the latest exodus, and the Bangladesh minister said they could also be considered for the repatriation, under the terms of the agreement.

The agreement, however, says they will be “considered separately on the conclusion of the present agreement.”

Some independent estimates suggest there are still a few hundred thousand Rohingya remaining in Rakhine.