In mid-November, just after Donald Trump was elected president, the outgoing Obama administration reached an agreement with Australia to resettle hundreds of refugees to America.

Australia’s hard-line policy to deter illegal immigration had banished thousands of asylum-seekers, most from the Middle East, to offshore detention centers on the Pacific island nation of Nauru and Papua New Guinea’s Manus Island.

After human rights groups had reported poor conditions and abuse at camps on the islands, the United Nations intervened and worked with Australia to secure a pledge from President Barack Obama to accept about 1,250 refugees, provided they passed U.S. security screening.

Obama’s deal, which attracted little attention when the U.S. and Australia announced its terms, collided this week with the policies of the Trump administration, which just temporarily barred people from entering the U.S. who come from seven countries Congress and the Obama administration had designated as posing terrorism risks.

>>>Experts Debate Whether Trump’s Refugee Order Will Make America Safer

In a phone call with Australian Prime Minister Malcolm Turnbull on Saturday, Trump reportedly criticized the refugee deal, although the two leaders have disputed media accounts about the content of the discussion.

“You can see why Trump, given his views, would be upset about this deal,” said Kevin Appleby, senior director of international migration policy at the Center for Migration Studies in New York, in an interview with The Daily Signal. “It’s like a fly in his ointment. He sees the deal puts him in a bad position politically. He’s probably wondering what Australia is doing for us when the U.S. is taking in all these refugees from countries that are now banned.”

Despite his misgivings, Trump later agreed to honor the initial agreement, according to Turnbull and the White House press secretary, Sean Spicer. It’s unclear how many refugees will ultimately be resettled in the U.S. and when they might come.

Spicer said Trump was “extremely upset” to have inherited the deal, but would fulfill the U.S.’ commitment to it.

Many of the refugees stranded in the Australian-run detention centers—and designated for resettlement in the U.S.—came from Iran, Iraq, Sudan, and Somalia, countries included in Trump’s order.

A special provision in the Trump order allows for exceptions to honor “a pre­-existing international agreement,” a line that seems to reference the Australia deal.

In November, the parties to the deal said the U.S. would prioritize families and children, and that the transfer of refugees would take six months to a year as the refugees underwent vetting, including two rounds of interviews with America’s Department of Homeland Security.

According to the Australian government, around 80 percent of people in the offshore detention camps have been determined to be legitimate refugees.

As the Trump administration decides how to implement the deal, some are expressing concern about how the Obama administration negotiated the agreement in the first place.

On Thursday, Senate Judiciary Committee Chairman Chuck Grassley, R-Iowa, wrote a letter to Rex Tillerson, Trump’s new secretary of state, asking him to declassify the details of the agreement.

Grassley first raised concerns about the agreement in November, when he wrote to the Obama administration and accused it of “failing to allow for public scrutiny of the plan” and not consulting Congress about it.

“As I said before, the American people have a right to be fully aware of the actions of their government regarding foreign nationals who may be admitted to the United States,” Grassley wrote in the letter to Tillerson. “American taxpayers not only foot the bill for the majority of the refugee resettlement in the United States, but they bear any consequences regarding the security implications of those admitted to our country.”

Appleby doesn’t consider the refugees coming to the U.S. in the deal as much of a security risk.

“It’s beyond reason that some ISIS terrorist would go through all of this when it’s much easier for them to radicalize someone already living in the U.S. or Australia than sending someone through this multi-year, brutal process,” Appleby said.

But he and other experts say the agreement could be viewed as rewarding Australia for an immigration policy that has been widely criticized.

“These are human beings who have been living in very difficult conditions on these islands for years,” Nayla Rush, a senior researcher at the Center for Immigration Studies, said in an interview with The Daily Signal. “It doesn’t make sense for the U.S. to take them. Why should the U.S. be the moral compass of Australia? These people want to go to Australia. They have been stranded by the Australian government, and they are responsible.”

While the Obama administration and Australian government have not said the U.S received something in return as part of the deal, the parties signed their agreement two months after Turnbull agreed to help the U.S. resettle refugees fleeing violence in El Salvador, Guatemala, and Honduras.

“There will not be a people swap,” Scott Ryan, a special minister of state in Australia, said at the time.

Under a long-standing policy, Australia mandates offshore detention centers for asylum-seekers who arrive by boat.

According to CNN, Australia launched Operation Sovereign Borders (OSB) in 2013 after a previous liberalization of immigration policies resulted in a surge of the number of people arriving by boat from 161 in 2008 to 2,726 in 2009.

But the new deterrence strategy did not slow the immigration flow.

The Guardian in 2016 reported cases of physical and sexual abuse of refugees at the detention centers. Protesters rallied across Australia demanding the closure of the centers.

In April 2016, Papua New Guinea’s Supreme Court ordered the Australian government to close the processing center there, calling the facility a violation of the migrants’ rights.

“The Australia deal with the U.S. is reflective of a failed policy, and that’s the larger point here,” Appleby said. “It’s a broader strategy the developed nations are pursuing to deter large movements of people. That doesn’t work, and the U.S. and Australia are now bailing each other out.”