The Obama administration reportedly agreed to offload three Rwandans accused of slaughtering Americans to Australia -- a previously unknown arrangement connected to a broader migrant swap between the two countries that made headlines when President Trump balked at the deal in 2017.

A lengthy Politico report detailed how the administration agreed to transfer the three Rwandan men accused of a gruesome 1999 attack against Western tourists on a gorilla-watching visit to Uganda. They had been extradited to the U.S. and charged under terrorism laws, but in 2006 a judge ruled that the men’s confessions to the attacks that left two Americans and six other Western tourists dead were extracted through torture by Rwandan officials. The case was dropped and the men were left in limbo until the Obama-era deal.

US TO SEND HOSPITAL SHIP TO HELP WITH VENEZUELAN REFUGEES

The agreement to send them to Australia reportedly was made amid a seemingly related deal, struck during the final days of the Obama administration, for the U.S. to take as many as 1,250 migrants whom Australia was holding in offshore refugee centers -- which had come under international scrutiny for alleged mistreatment of migrants. In return, the U.S. would send over a much smaller number of refugees in Central America as part of an effort to relocate people fleeing drug violence.

President Trump famously raged at then-Prime Minister Malcolm Turnbull in January 2017 and tried to renege on the deal, saying it would make him “look terrible” considering he was elected to office on a platform of reducing migration.

“Here I am calling for a ban where I am not letting anybody in and we take 2,000 people. Really it looks like 2,000 people that Australia does not want and I do not blame you by the way, but the United States has become like a dumping ground,” he said, according to a transcript of the call obtained by The Washington Post.

Later, when Turnbull pushed back against Trump’s claim that “they are not going to be wonderful people,” Trump quipped, “Well, maybe you should let them out of prison.”

“This is a stupid deal. This deal will make me look terrible,” he said. However, he indicated he would not nix the deal.

TRUMP ORDERS ASYLUM OVERHAUL, INCLUDING NEW FEE FOR APPLICANTS AND FASTER ADJUDICATIONS

But amid coverage of that tense conversation, Turnbull may have hinted at the Rwandan prisoner pact, saying cryptically in the leaked transcript: “We are taking people from the previous administration that they were very keen on getting out of the United States.”

That comment has been given new context by the Politico report that highlights the agreement on the Rwandan men. Two of the three men were sent to Australia last year, with no indication they were jailed or detained by authorities there. The remaining man is being held in an Immigration and Customs Enforcement detention center in Miami, according to the outlet, possibly because the Australians balked at settling him after he attacked a guard.

Politico reports that officials say the deal was not specifically a quid pro quo, but that the Obama administration encouraged Australia to make “a series of gestures on refugee-related issues” in response to the U.S. agreement to take the 1,250 refugees in Australia.

Asked whether the transfer of the Rwandans was explicitly part of the deal, a source told Politico: “The prime minister understood the deal completely. President Trump did not.”

A State Department spokesperson told Fox News that it does not discuss the details of sensitive diplomatic discussions, but that the U.S. continues to honor the arrangement to resettle the refugees. The spokesperson said that so far the U.S. has resettled over 500 refugees.

The revelation is likely to be uncomfortable for current Prime Minister Scott Morrison, who replaced Turnbull last year. It comes just days before a general election in the country.

CLICK HERE TO GET THE FOX NEWS APP

Morrison was asked about the story Thursday and told reporters: “Every single person that comes to Australia under any such arrangements are the subjects of both character and security assessments."

"I don’t intend to make a commentary on allegations that have been made ... but simply to assure Australians that they are the process we undertake, and these are the same security agencies that have thwarted 15 terrorist attacks."