– North Korea issued a $2 million bill for the hospital care of comatose American Otto Warmbier, insisting that a U.S. official sign a pledge to pay it before being allowed to fly the University of Virginia student from Pyongyang in 2017.

The presentation of the invoice — not previously disclosed by U.S. or North Korean officials — was extraordinarily brazen even for a regime known for its aggressive tactics.

But the main U.S. envoy sent to retrieve Warmbier signed an agreement to pay the medical bill on instructions passed down from President Donald Trump, according to two people familiar with the situation. They spoke on the condition of anonymity.

The bill went to the Treasury Department, where it remained unpaid throughout 2017, the people said. However, it is unclear whether the Trump administration later paid the bill, or whether it came up during preparations for Trump's two summits with Kim Jong Un.

The White House declined to comment. "We do not comment on hostage negotiations, which is why they have been so successful during this ­administration," White House press secretary Sarah Sanders wrote in an e-mail.

Trump, as recently as Sept. 30, asserted that his administration paid "nothing" to get American "hostages" out of North Korea.

Warmbier, who was 21, fell into a coma for unknown reasons the night he was sentenced to 15 years in prison with hard labor in March 2016.

He was convicted on charges stemming from pulling down a propaganda sign in a Pyongyang hotel in the early hours of Jan. 1, 2016. Such an infraction would be minor in almost any other country, but in North Korea it was considered a "hostile act against the state."

Fred Warmbier, Otto's father, said he was never told about the hospital bill. He said it sounded like a "ransom" for his late son.

After his sentencing, the North Koreans held onto the comatose student for another 15 months, not even telling American officials until June 2017 that he had been unconscious all that time. News of his condition sparked a frantic effort led by Joseph Yun, the State Department's point man on North Korea at the time, to get Warmbier home.

Yun and an emergency medicine doctor, Michael Flueckiger, traveled to Pyongyang on a medical evacuation plane. They were taken to Friendship Hospital in the diplomatic district, a clinic where only foreigners are treated, and found Warmbier lying in a room marked "intensive care unit," unresponsive and with a feeding tube in his nose.

Flueckiger examined Warmbier and asked the two North Korean doctors, who had a thick pile of charts, questions about the lab work, scans and X-rays they had done.

Afterward, they went to a meeting room where the talks to free Warmbier began.

"I didn't realize what a negotiation it was going to be to secure his release," said Flueckiger, who is medical director of Phoenix Air Group, an aviation company based in Cartersville, Ga., that specializes in medical evacuations.

North Korean officials asked the doctor to write a report about his findings. "It was my impression that if I did not give them a document that I could sign off on, that would cause problems," Flueckiger said in an interview.

But the American said he did not have to lie in his report. Whatever had happened to put Warmbier into that state, it was "evident" that he had received "really good care" in the hospital, he said. The doctors had done "state-of-the-art resuscitation" to revive Warmbier after he suffered a catastrophic cardiovascular collapse, and it was "remarkable" that he had no bedsores, Flueckiger said.

"Would I have lied to get him out of there? Maybe I would have," he said. "But I didn't have to answer that question."

Yun, however, was faced with a more difficult predicament.

The North Korean officials handed him a bill for $2 million, insisting he sign an agreement to pay it before they would allow him to take Warmbier home, according to the two people familiar with the situation.

Yun called then-Secretary of State Rex Tillerson and told him about the bill. Tillerson called Trump. They instructed their envoy to sign the piece of paper agreeing that the $2 million would be paid, the two people said.

Flueckiger discussed the medical aspects of Warmbier's evacuation but said he was not authorized to discuss the diplomatic negotiations.

A State Department spokesman and Yun, who retired in early 2018, both declined to comment. Tillerson, the Treasury Department and North Korea's envoy responsible for U.S. affairs did not respond to requests for comment.