SYDNEY (Reuters) - Australia has reached a resettlement deal with the United States for refugees being held in Papua New Guinea and Nauru after attempting to reach Australia by boat, Prime Minister Malcolm Turnbull said on Sunday.

Australia's Prime Minister Malcolm Turnbull speaks to the media after a tour of the Australian Maritime Border Command Centre in Canberra, November 13, 2016. AAP/Lukas Coch/via REUTERS

Under Australia’s tough border security laws, asylum seekers intercepted trying to reach the country by boat are sent for processing at detention camps on Papua New Guinea’s Manus island and the tiny South Pacific island nation of Nauru.

Some 1,200 people are in detention, with many held for more than three years. The United Nations and human rights groups have criticized the detentions.

“I can now confirm that the government has reached a further third country resettlement arrangement for refugees presently in the regional processing centers. The agreement is with the United States,” Turnbull told a press conference in Canberra.

U.S. President-elect Donald Trump has threatened to ban Muslims from entering the United States and championed anti-immigration policies, raising uncertainty about the resettlement deal. Many of the detainees come for Afghanistan and Iraq.

Amnesty International said it was extremely concerned about the lack of information around the timeline and the number of refugees to be processed. No timeline was given for the process.

“Amnesty International has seen first hand the horrific abuse that is being inflicted on people in Nauru and on Manus island, so we are pleased that for those who may be resettled in the U.S. the abuse will come to an end...,” said Dr Graham Thom, Refugee Coordinator at Amnesty International Australia.

Slideshow ( 3 images )

Abdul Aziz, 24, who has spent more than three years on Manus Island after fleeing his home in Sudan in 2013, was very happy.

“All the refugees were smiling and hugging each other. This nightmare is going to end finally, but the main question is when and how and how we get out of here,” he told Reuters.

The agreement, to be administered with the U.N. High Commission on Refugees (UNHCR), is available only to those currently in the processing centers and will not be repeated.

Turnbull would not say how many refugees would be resettled in the United States, but that women, children and families would be prioritized. Those who have had refugee applications rejected should return to their countries, he said.

While noting Australia’s detention policy had caused “immense harm to vulnerable people”, the UNHCR said it will endorse referrals made from Australia to the United States.

The detention of asylum seekers is a hot-button political issue in Australia, but has bipartisan support as the policy has won elections. However, it has been condemned at home and overseas amid reports of systemic abuse.

The U.S. resettlement deal relieves a major headache for Turnbull, whose poll numbers fell to a 14-month low last week, raising speculation of fresh political turbulence in a country that has had four leaders in six years.

Papua New Guinea has said it will close the Manus island center after its supreme court ruled detention of asylum seekers there was unconstitutional. The Nauru facility will remain open.

Asylum seekers who refuse offers to resettle or to return home will be offered a 20-year visa to stay on Nauru, but no financial support, Immigration Minister Peter Dutton said.

Once rich in phosphate, Nauru has limited economic resources and the Australian-funded detention center provides the tiny island state’s most significant revenue stream.