Australian Prime Minister Malcolm Turnbull says about 50 refugees currently housed in two remote Pacific detention centers will soon be resettled in the United States.

Turnbull announced Wednesday during a television interview that an equal number of refugees being held in Papua New Guinea and Nauru are heading to the U.S. within the next several weeks.

The refugees are the first of 1,250 asylum seekers that are being resettled in the United States under a deal struck between Canberra and Washington in the final weeks of President Barack Obama's administration. Obama's successor, Donald Trump, attacked the agreement during a contentious phone call with Turnbull shortly after taking office, and called it "a dumb deal" in an angry tweet posted in February, before eventually agreeing to honor it.

"I just want to thank again President Trump for continuing with that arrangement," Turnbull said Wednesday during his interview.

More than 1,200 asylum seekers from Africa, Asia and the Middle East are being held in Nauru and Papua New Guinea's northern island of Manus, as part of Canberra's policy of intercepting people attempting to sail to Australia and seek asylum. Many of them are barred from accepting citizenship in Australia, even if they are granted refugee status.

Human rights groups have denounced Australia over its treatment of the asylum seekers. Amnesty International issued a report last October alleging that many of the 400 men, women and children being held on Nauru have been subjected to physical and mental abuse and neglect, and have attempted various forms of self-harm, including attempted suicides, and were falling into deep despair over their long detention and uncertain fate.

Papua New Guinea's Supreme Court ruled last year that the detention center on Manus was unconstitutional, because it violated the detainees’ constitutional right of personal liberty.

Australia is set to close the center next month.