China's President Hu and Premier Wen attend a banquet marking the 63rd anniversary of the founding of the People's Republic of China in Beijing
China's President Hu (third right) and Premier Wen (left) attend a banquet with other senior leaders marking the 63rd anniversary of the founding of the People's Republic of China in Beijing (Reuters)

A would-be politician in China has been sentenced to eight years in prison for attempting to form an opposition party, which only existed for one day online.

Cao Haibo, 27, had tried to form a party called the China Republican party just a week ahead of the 18 Chinese communist party (CPC) congress that will usher in a new generation of leaders.

His lawyer, Ma Xiaopeng, said that a court in the southwestern city of Kunming sentenced Cao for "subversion of state power", a harsher sentence to the one available for the charge of incitement of subversion, which is used against many party critics.

"Cao Haibo does not understand politics in China," Ma said. "We think he's an immature child. He really did not know that the [Communist] party would take it this seriously."

Cao is not a prominent dissident in China but police cited text messages he sent friends as an example of his subversive behaviour. He was running an internet café.

Cao's wife, Zhang Yan, confirmed that he was jailed for eight years. "It exceeded our expectations. We thought he would be sentenced to five years at the most," she said.

They had been married for only three months when police arrested Cao in October 2011. They have a nine-month-old child. Defendants facing subversion charges in China are almost never acquitted.

Prominent human rights lawyer Mo Shaoping told NBC News that the sentencing is wrong in Cao's case because he never actually engaged in forming a political party.