On his 13th day in office, President Donald Trump threatened to break an international agreement. On Twitter.

Do you believe it? The Obama Administration agreed to take thousands of illegal immigrants from Australia. Why? I will study this dumb deal! — Donald J. Trump (@realDonaldTrump) February 2, 2017

The tweet appeared to confirm a report from the Washington Post that the president, in his call with Australian Prime Minister Malcolm Turnbull Sunday, had berated Turnbull about an agreement made with the Obama administration — in which hundreds of refugees being held offshore in Australian detention centers are being screened for admission to the US.

The executive order Trump signed on Friday banned nearly all refugee admissions to the US for four months — but with a loophole to allow refugees to be resettled per a “preexisting international agreement.” White House press secretary Sean Spicer and the US Embassy in Australia have both explicitly promised, since the executive order was signed, that the Trump administration would honor the deal. “The president, in accordance with that deal, to honor what had been agreed upon by the United States government … will go forward,” Spicer told journalists Tuesday.

That may be news to Trump.

The president and his press secretary also appear to differ on the scope of the deal; Spicer said the US would take 1,250 refugees, which appears to refer to the number currently in offshore detention centers (not all of whom are guaranteed to pass through screening); Trump’s call with Turnbull referred to 2,000, which could be a reference to the fact that the US is also screening hundreds of refugees receiving medical care in Australia (or could just be wrong).

Taken together, it’s clear that the best-case scenario is that the new president dislikes a deal he also doesn’t understand. The worst-case scenario is that he will break it.

Australia has been holding hundreds of refugees in inhumane conditions for years

Australia, like the US, has been a destination for people fleeing poverty and persecution in nearby countries — putting both countries in a position of having to square their desires for “border security” (not letting in people who don’t already have papers) with their obligations under domestic and international law to allow people to apply for asylum and not to send people back to places where their lives may be in danger.

Australia has heavily favored the former over the latter. It’s launched a campaign of deterrence to tell people not even to try to come to the country (including advertisements and even graphic novels). And it’s held people who do try to sail to Australia in offshore detention centers, mostly on Nauru and on the Papua New Guinea island of Manus, to deter others from trying to follow.

The overwhelming majority of people who’ve been screened at those centers (around 80 percent) have been formally approved as refugees by the Australian government. But the Australian government still isn’t permitting them to resettle, and most detainees on Nauru, as of an August 2016 Human Rights Watch report, had been there for three years.

Conditions in the camps are often appalling. An Amnesty International report (also from August 2016) documented that refugees were denied access to medical care. A Guardian Australia project called the Nauru Files collated 2,000 reports of abuse between 2013 and 2015, ranging from security guards hitting children’s heads against the wall to detainees swallowing rocks in self-harm. Detainees have resorted to self-immolation to draw attention to their plight.

The situation was unsustainable — especially when a Papua New Guinea judge ruled last year that the detention center on Manus Island violated PNG law, and ordered the Australian government to dismantle it. But Australia continued to look for any solution that wouldn’t require it to actually accept the refugees. That’s where the US comes in.

Australia and the US made a deal for the US to screen and accept refugees — which is probably still on

In November, the Australian and US governments announced they’d arrived at an “agreement”: Refugees currently being held in offshore detention centers could apply to be resettled in the US.

The refugees being held in Australia, like any other refugee applying to come to the US, would go through the normal screening process over a course of months or years. (Several detainees told CNN Australia that they’d already had one round of interviews with US officials since the deal was agreed to.)

The details of the agreement were a little fuzzy. It wasn’t clear how many refugees the US would end up taking, and there was some confusion about what role the UN High Commissioner for Refugees would play in the process. While Australia’s top immigration official, Michael Pezzullo, called the deal “an agreement entered into through diplomatic means,” it’s not clear whether a text was ever actually signed.

The executive order Trump signed on Friday banned nearly all refugee admissions. But it made an explicit exception for refugee cases “when admitting the person would enable the United States to conform its conduct to a preexisting international agreement” — a phrase that many observers assumed referred to the Australia agreement. (Interestingly, this loophole didn’t appear in drafts of the executive order leaked to the Huffington Post and Vox in the days before the order was signed, suggesting it might have been added late in the process.)

Spicer assured the press on Tuesday that despite the executive order, the US would resettle up to 1,250 Australia detainees — which appears to be based on the number of refugees being held in detention as of November, not on the agreement itself.

Since some number of the refugees on Nauru and Manus come from Iran, Iraq, and Somalia — countries categorically excluded under another part of the executive order — it’s not clear how many of those the US would actually accept. (Spicer swore that the refugees would be put through “extreme vetting,” but used the phrase to describe the preexisting refugee screening process — the one the Trump administration has halted all other refugee admissions to replace.)

On Wednesday, however, the Washington Post reported that Trump was upset about the refugee deal, and had complained to Turnbull about it in a call Sunday. According to the paper, Trump even said the deal could allow “the new Boston bombers” or other terrorists into the US. “I don’t want these people,” he said, per the report.

The US Embassy in Canberra attempted to reassure the public:

Statement from the US Embassy in Canberra. Trump Whitehouse will honour the refugee deal. Wow. pic.twitter.com/atJqPpPe6T — James Massola (@jamesmassola) February 2, 2017

But Trump’s tweet undid any progress the embassy had made.

The president’s apparent willingness to renege on the agreement — or at least “study” it, with what appears to be extreme prejudice — might send worrisome signs to America’s other allies, who might have reason to worry about all the other international agreements that have been made between their countries and the US. But it’s also the result of the way harsh immigration policies eventually become their own justification — a tragic game of telephone.

No one on Nauru or Manus is known to have done anything wrong or to want to come to the US to carry out terror attacks. They’re being held offshore as a symbol to others who might consider trying to escape their home countries for Australia. But once they’re being kept offshore and held in detention, it’s very easy to assume that they must be held for a reason — that they must be dangerous. And that’s clearly what Trump has done.