The famous "tank man" photo came from the 1989 protest, and became a symbol of civil disobedience worldwide.

At the weekend, China plans to release the final prisoner held for the 1989 Tiananmen Square protests, but after more than 27 years behind bars, he will rejoin the world a physically and mentally ill man, a rights group said.

Miao Deshun, a factory worker from Beijing, was not a leading figure in the pro-democracy demonstrations. Nevertheless, he was given a suspended death sentence for arson after he threw a basket at a burning tank during the June 4, 1989, crackdown on the protests.

His sentence was later commuted to life in prison and subsequently reduced further, according to the Dui Hua Foundation, a San Francisco-based group that advocates for the rights of political prisoners in China.

ANTHONY KWAN/GETTY IMAGES People hold candles as they take part at a vigil on June 4, 2016 in Hong Kong, to commemorate the killing of protesters in Beijing's Tiananmen Square in 1989.

At 51, Miao has spent more than half his life behind bars and has had no contact with the outside world for many years: His family stopped visiting him more than 10 years ago, reportedly at his own request, Dui Hua said in a statement.

READ MORE:

* Amnesia over Tiananmen Square massacre

* Students split from protest vigil

* The Tiananmen Square massacre: a quarter of a century on

He suffers from hepatitis B and schizophrenia: Former prison inmates remember him as a very thin man who refused to admit wrongdoing and participate in prison labour, who was both tortured and confined to periods of solitary confinement as a result.

LAM YIK FEI/GETTY IMAGES Thousands of people hold candles during a candlelight vigil, remembering the 1989 protests that left hundreds head.

"No one other than prison officials or other prisoners in the ward for sick and disabled prisoners have seen him for many years," Dui Hua's executive director, John Kamm, told The Associated Press in an email, adding that Miao was severely ill.

Tens of thousands of troops and tanks converged on Beijing's iconic Tiananmen Square to quash months of protests on the night of June 3-4, 1989. Several hundred people were killed - possibly several thousand - and more than 1600 people around the country were subsequently jailed.

Today, young Chinese people know little of the events that marked the last major popular challenge to Communist rule on the mainland, but in Hong Kong, the anniversary is always marked with a candlelight vigil attended by tens of thousands.

Wu Wenjian, a dissident and painter who was in jail with Miao Deshun in Beijing from 1990 to 1994, said Miao's "persistent" refusal to accept that he had committed a crime, participate in hard labor or sign repentance letters, was partly why he had remained in jail so long.

"He's a loner," Wu said. "At that time, whoever got a suspended death sentence would at least pretend to accept the sentence and the reform education, but he wouldn't. He kept appealing and refused to be reformed."

Wu said prison guards had frequently beaten Miao, including with electric batons, and even then he had not been in good health. "The main problem was with his mental health," he said. "It's quite understandable given that he got a suspended death sentence and was under immense pressure."

The Dui Hua Foundation said Miao was due to be released at the weekend from Yanqing prison northeast of Beijing after being given an 11-month sentence reduction this year, but the AP said the date could not be independently verified, as the Ministry of Public Security and the Beijing Higher People's Court were not responding to faxed requests for comment.

Hu Jia, a prominent human rights activist, said Miao's life had been ruined, adding that he would need to readapt himself to a society very different from the one that existed before he was jailed.

"He might find himself leaving a small jail but entering a bigger prison," he said. "He's likely to find himself surrounded by state security police upon his release, something unimaginable before he went to jail. Release from jail does not necessarily mean more freedom."

But Qi Zhiyong, who lost a leg in the crackdown near Tiananmen Square, said he was "excited" by the news of Miao's release. "We are from the same generation - an oppressed generation," he said.