TOKYO (AP) — Two prisoners locked away by two repressive systems, their conditions largely unknown. When the news did come, it was sudden and bad.

North Korea released 22-year-old American student Otto Warmbier in mid-June after 17 months in detention, but in a coma. He died a week later at a hospital in Ohio. Later the same month, Chinese authorities said 61-year-old democracy activist Liu Xiaobo had been diagnosed with late-stage liver cancer and transferred from prison to a hospital. He died Thursday.

Both countries made their own internal calculations about how best to deal with the situations, in seeming disregard of international pressure and public opinion. The cases of Liu and Warmbier illustrate the lengths to which the two authoritarian governments go to control information, more so in North Korea but still markedly so in China. In both countries, the overriding objective is clear: survival of the ruling party.

___

AN AMERICAN IN NORTH KOREA

The world may never learn what happened to Otto Warmbier.

North Korea's media doesn't pretend to be objective. It is government-controlled, and judging by its content, its main purpose is to boost the ruling Workers' Party and the Kim family regime that is now in its third generation of leadership.

What's known is Warmbier was detained at Pyongyang's airport on Jan. 2, 2016, at the end of a group tour to North Korea. Two months later, the University of Virginia student appeared before media in Pyongyang, bowing deeply and tearfully apologizing for what he said was an attempt to steal a North Korean political banner from a hotel. Soon after, he was sentenced to 15 years in prison with hard labor.

More than a year later came the surprise announcement that he was being released, but in a coma. His limp body could be seen being carried off a small plane at night at an airport in Cincinnati, Ohio.

It was far from the usual ending to the arrest of an American in North Korea. The U.S. government has accused North Korea of using American detainees as political pawns; in the past, they have been released after senior U.S. officials or statesmen came to bail them out.

"One of the de facto ground rules was the hostage gets returned in generally OK health," said Phil Robertson, deputy Asia director of Human Rights Watch. "Warmbier's case broke that mold and has generated more questions than answers."

His family was told he fell into a coma soon after his March 2016 sentencing. Doctors who examined him in the U.S. said he had "severe neurological injury" but couldn't determine the cause.

As speculation swirled, North Korea remained silent. Three days after he died, the state news agency distributed a lengthy statement from North Korea's Foreign Ministry defending its treatment of him. It said he had received medical care on a humanitarian basis and accused the U.S. of a smear campaign. No details were provided about what actually happened.

___

CHINA'S "WORST NIGHTMARE"

China went to great lengths to shut Liu Xiaobo up. He was, after all, one of the most articulate advocates for democracy in his country, a potential threat to Communist Party rule.

His wife was placed under house arrest and security officers blocked media from trying to visit her. Journalists and friends were unable to find him at the hospital where he was being treated. Questions asked about him at the daily Foreign Ministry news briefings were scrubbed out of published transcripts.

Bits of information leaked out through friends, including a video call with his wife, sobbing about his dire prognosis before he died.

As word got out, China made at least a cursory stab at transparency, saying that Liu had been diagnosed with cancer on May 23 and sent to a hospital on medical parole. China has opened up considerably in the decades since the days of former leader Mao Zedong, and unlike North Korea, it actively tried to manage the message at the end with regular medical updates.

When confronted with demands that Liu, a Nobel Peace Prize laureate, be released and allowed to travel overseas for treatment, though, the Foreign Ministry responded with a familiar refrain: that outsiders should not "interfere in China's domestic affairs."

China released high-profile dissidents on medical grounds in the 1990s, immediately exiling them to the U.S. The current government of President Xi Jinping has turned considerably tougher, forbidding many of its critics to travel abroad while it pursues a sweeping campaign against dissent.

"This kind of leader is their worst nightmare," Yang Jianli, a dissident in exile in the U.S., said of Liu. "My guess is they will continue further tightening the society ... so that they can prevent another Liu Xiaobo from emerging."

___

Associated Press writer Christopher Bodeen in Beijing contributed to this report.