Otto Warmbier, an American university student held prisoner in North Korea for 17 months and said by his family to be in a coma, has been medically evacuated from the reclusive country after a rare visit there from a high-level U.S. official.

Warmbier, 22, a University of Virginia student from suburban Cincinnati, was on his way back to the United States on Tuesday, U.S. Secretary of State Rex Tillerson said.

The release came after Joseph Yun, the State Department’s special envoy on North Korea, travelled to Pyongyang and demanded his freedom on “humanitarian grounds,” capping a flurry of secret diplomatic contacts, a U.S. official said.

Warmbier's parents, Fred and Cindy, confirmed their son was on a medevac flight, which was due to arrive on Tuesday evening U.S. time.

"Sadly, he is in a coma and we have been told he has been in that condition since March of 2016," the parents said in a statement. "We learned of this only one week ago. We want the world to know how we and our son have been brutalized and terrorized by the pariah regime in North Korea."

Warmbier was detained in January 2016 and sentenced to 15 years of hard labour in March last year for trying to steal an item with a propaganda slogan, according to North Korean media.

A spokeswoman at the University of Cincinnati Medical Center said Warmbier would be treated there.

The family said it was told by North Korean officials, through contacts with American envoys, that Warmbier fell ill from botulism sometime after his March 2016 trial and lapsed into a coma after taking a sleeping pill, the Washington Post reported.

The New York Times quoted a senior U.S. official as saying that Washington recently received intelligence reports that Warmbier had been repeatedly beaten in custody.

State Department spokeswoman Heather Nauert, asked whether Warmbier’s release could open the way for dialogue amid high tensions between the Trump administration and North Korea, said: “It’s just too soon to say.”

Hours after the release, the U.S. government blamed Pyongyang for a raft of cyber attacks stretching back to 2009, while warning more were likely.

Warmbier’s release came as former U.S. basketball star Dennis Rodman arrived in North Korea on Tuesday, returning to the nuclear-armed country where he previously met leader Kim Jong Un.

The State Department denied any connection between Warmbier’s release and Rodman’s visit, which the Trump administration said it did not authorize.

The State Department is continuing to discuss three other detained Americans with North Korea, Tillerson said.

Since taking office in January, U.S. President Donald Trump has faced a growing national security challenge from North Korea, which has conducted a series of ballistic missile tests in defiance of U.S. and international sanctions.

White House spokeswoman Sarah Sanders, speaking to reporters on Air Force One, said "bringing Otto home was a big priority for the president."

SECRET DIPLOMACY

In rare high-level contacts, Yun met senior North Korean officials in Oslo in May, where it was agreed that Swedish officials in Pyongyang, who handle U.S. consular affairs there, would be allowed to see all four American detainees, a State Department official said.

The North Koreans later urgently requested another meeting in New York, and Yun met North Korea’s ambassador to the United Nations on June 6 and was told about Warmbier’s “condition,” the official said, speaking on condition of anonymity.

Tillerson consulted with Trump, and arrangements were made for Yun and a medical team to travel to Pyongyang, the official said.

Yun arrived on Monday, visited Warmbier with two doctors and demanded his release, the official said. The North Koreans agreed and he was flown out on Tuesday, the official said.

“In no uncertain terms North Korea must explain the causes of his coma,” Bill Richardson, a veteran former diplomat and politician who has played a role in past negotiations with North Korea, said in a statement after speaking to Warmbier’s parents.