BEIJING — Liu Xiaobo, the renegade Chinese intellectual who kept vigil on Tiananmen Square in 1989 to protect protesters from encroaching soldiers, promoted a pro-democracy charter that brought him an 11-year prison sentence and was awarded the Nobel Peace Prize of 2010 while locked away, died Thursday. He was 61.

The bureau of justice of Shenyang, the city in northeastern China where Liu was being treated for cancer, announced on its website that Liu had died.

The Chinese government revealed he had liver cancer in late June only after it was virtually beyond treatment. Officially, Liu gained medical parole. But even as he faced death, he was kept silenced and under guard in a hospital, still a captive of the authoritarian controls that he had fought for decades.

The police have kept his wife, Liu Xia, under house arrest and smothering surveillance, preventing her from speaking out about Liu's death and his belated treatment for cancer.

"Can't operate, can't do radiotherapy, can't do chemotherapy," Liu Xia said in a brief video message to a friend when her husband's fatal condition was announced. The message quickly spread online.

Liu's illness elicited a deluge of sympathy from friends, Chinese rights activists and international groups, who saw him as a fearless advocate of peaceful democratic change. He was the first Nobel Peace laureate to die in state custody since Carl von Ossietzky, the German pacifist and foe of Nazism who won the prize in 1935 and died under guard in 1938 after years of maltreatment.

"The reaction to his illness shows how much he was respected," said Cui Weiping, a former professor of literature in Beijing who knew Liu and now lives in Los Angeles. "People from all walks of life — friends, strangers, young people — have been outraged to hear that someone with terminal cancer was kept locked up till he died."

Liu was arrested most recently in 2008, after he helped initiate Charter 08, a bold petition calling for democracy, the rule of law and an end to censorship.

A year later, a court in Beijing tried and convicted Liu on a charge of inciting subversion. The petition and essays he wrote in which he upbraided and mocked the Chinese government were cited in the verdict. Liu responded to his trial with a warning about China's future.

"Hatred can rot a person's wisdom and conscience," Liu said in a statement he prepared for the trial. "An enemy mentality will poison the spirit of a nation and inflame brutal life and death struggles, destroy a society's tolerance and humanity, and hinder a country's advance toward freedom and democracy."

By the time of the trial, Liu was already China's best-known dissident, and his fame grew even more when he was awarded the Nobel Peace Prize in 2010 while imprisoned in northeast China. The Nobel committee in Norway praised him as "the foremost symbol of this wide-ranging struggle for human rights in China."

Liu could not collect the prize himself, and he was represented at the ceremony by an empty chair. His statement for his trial, which he was not allowed to read out, served in his absence as his Nobel lecture.

"Xiaobo was wedded both psychically and physically to China and its fate," Geremie R. Barmé, an Australian Sinologist and a close friend of Liu's, wrote in a tribute before Liu's death. "In the end, his words and deeds may have garnered him a Nobel Prize, yet in an authoritarian system, one that since 1989 has oscillated merely between the poles of the cruel and the pitiless, they sealed his fate."

Confrontation and detention were nothing new to Liu.

He was born Dec. 28, 1955, in Jilin province, in northeast China. The son of a professor who remained loyal to the Communist Party, Liu made a vocation out of obdurate opposition to authoritarianism.

Liu started out as a notoriously abrasive literary critic in Beijing in the 1980s. He was called a "dark horse" who bridled at intellectual conformity, even in the name of reform. But he was increasingly drawn into political questions as Deng Xiaoping, the Communist leader, resisted matching economic liberalization with political transformation.

In 1989, he was a visiting scholar at Columbia University when students in Beijing occupied Tiananmen Square to demand democratic changes and an end to party corruption. He returned to Beijing to support the protests. He later described that time as a turning point, one that ended his academic career and set him irrevocably into a life of political opposition.

Liu's sympathy for the students was not unreserved; he eventually urged them to leave Tiananmen Square and return to their campuses. As signs grew that the Communist Party leadership would use force to end the protests, Liu and three friends, including the singer Hou Dejian, held a hunger strike on the square to show solidarity with the students, even as they advised them to leave.

"If we don't join the students in the square and face the same kind of danger, then we don't have any right to speak," Hou quoted Liu as saying.

When the army moved in, hundreds of protesters died in the gunfire and the chaos on roads leading to Tiananmen Square. But without Liu and his friends, the bloodshed might have been worse. On the night of June 3, they stayed in the square with thousands of students as tanks, armored vehicles and soldiers closed in.

Liu and his friends negotiated with the troops to create a safe passage for the remaining protesters to leave the square, and he coaxed the students to flee without a final showdown.

"I understand what you're feeling, but haven't you considered how as soon as the first shot rings out, Tiananmen Square will become a river of blood?" Liu told the students, as he recounted in a memoir published in 1989.

"If he hadn't been on the scene, I'm sure people would have died on the square. That was his pacifism in action," said Liu Suli, a friend of Liu who stayed with him and his friends on Tiananmen Square on the night of June 3. "Xiaobo had a kind of heroism complex that never left him."

Liu was arrested days after the crackdown and spent 21 months in detention for supporting the protests. He lost his university lecturing job, his books were banned, and the Communist Party labeled him a "black hand" who had helped foment turmoil. His later support for U.S. government policies, including the invasion of Iraq, also brought scorn.

But he was unbowed. In 1996, he was sent to a labor camp for three years after demanding clemency for those still in prison for joining the demonstrations.

Liu did not instigate Charter 08, but after he joined activists who were preparing to release it, he worked to make its demands acceptable to as many people as possible, tramping from door to door in Beijing to recruit prominent signatories.

The petition at first drew 303 signatories, including many prominent Chinese writers, academics, lawyers and former officials who were recruited by Liu. By May 2009, the number of signers had grown to over 8,600, including supporters living overseas.

"He was able to span people inside and outside the system," said Cui, the friend who also signed the charter. "He also linked together opposition movements from different generations. I don't think anyone other than Liu Xiaobo could have done that."

Liu and most other participants dismissed the risk that they could be severely punished. But his wife feared that the government would retaliate harshly. In the statement that Liu wrote for his trial, he thanked Liu Xia for her "selfless love."

"Even if I am crushed into powder, I will embrace you with ashes," he wrote. "Dearest, with your love, I will calmly face the impending trial, with no regrets for my choices, and will look forward with hope to tomorrow."