The United States was handed a $2m bill from North Korea for the hospital care of Otto Warmbier, the American student died soon after his release back to the US in a comatose state in 2017, after being detained for 17 months.

Acting on instructions passed down from Donald Trump, the main US official who was sent to North Korea to bring Warmbier back to the US signed an agreement to pay the surprise invoice he was handed by Pyongyang, according to the Washington Post on Thursday, which cited two anonymous sources familiar with the situation.

It is unclear whether the bill, which was then sent on to the treasury department, has ever been paid.

On Friday morning, the president tweeted: “No money was paid to North Korea for Otto Warmbier, not two Million Dollars, not anything else.”

The bill was first given to Joseph Yun, who was the US state department’s point-person for North Korea at the time, during negotiations for Warmbier’s release, according to the Post. The North Korean officials insisted Yun sign the invoice for $2m before they release Warmbier.

Going up his chain of command, Yun contacted the then secretary of state, Rex Tillerson, who contacted the president. Yun was then told to sign the agreement.

“We do not comment on hostage negotiations, which is why they have been so successful during this administration,” the White House press secretary, Sarah Sanders, wrote in an email to the Post.

Fred Warmbier, Otto’s father, said the bill sounded like a “ransom” for his son.

On Friday, Trump added: “This is not the Obama Administration that paid 1.8 Billion Dollars for four hostages, or gave five terroist hostages plus, who soon went back to battle, for traitor Sgt. Bergdahl!”

No money was paid to North Korea for Otto Warmbier, not two Million Dollars, not anything else. This is not the Obama Administration that paid 1.8 Billion Dollars for four hostages, or gave five terroist hostages plus, who soon went back to battle, for traitor Sgt. Bergdahl! — Donald J. Trump (@realDonaldTrump) April 26, 2019

It is a confused and confusing line about two separate deals negotiated by the Obama administration, one that transferred $1.7bn to Iran as part of a deal to end the country’s nuclear program and another to transfer five prisoners from Guantánamo Bay to Qatar in exchange for the captive US army sergeant Bowe Bergdahl, an operation that the Government Accountability Office estimated cost nearly $1m.

In his tweet, Trump appeared to conflate those two deals while getting every number involved wrong.

Warmbier was 22 when he died,less than a week after his return home. He had been sentenced to 15 years of hard labor after North Korea found him guilty of “crimes against the state” for taking a propaganda poster during a visit to Pyongyang.

Michael Flueckiger, an American emergency doctor, traveled with Yun to retrieve Warmbier. North Korean officials asked him to examine Warmbier and write a report.

The Ohio coroner’s office said at the time that it had not been able to determine the cause of Warmbier’s death after carrying out an external examination. His parents asked doctors not to conduct an autopsy.

At a press conference during his summit with Kim Jong-un in February, Trump said he believed Kim when the North Korean leader said he didn’t know what was happening to Warmbier.

“I don’t believe he knew about it. He felt very badly about it, I did speak to him. He knew about it, but he knew about it after,” Trump said at the conference.

The day after the press conference, Warbmier’s parents – who had been friendly with Trump up until that point – issued a statement that was a direct rebuke to Trump’s remarks. “Kim and his evil regime are responsible for unimaginable cruelty and inhumanity. No excuses or lavish praise can change that,” the statement read.