A Chinese court sentenced three men to death and a woman to life imprisonment on Friday after convicting them of terrorism and murder for killing 31 people in a knife attack outside a railway station in the southern city of Kunming earlier this year.

The convictions were expected when the Kunming Intermediate People's Court opened the trials of the four just hours earlier in the day, with state television showing armed police inside the courtroom.

The railway station attack in March shook the country as tensions between the Uighur Muslim minority and the majority Han ethnic group spread beyond the Uighur homeland of Xinjiang. The court did not identify the suspects' ethnicity, but all have Uighur-sounding names.

The defendants showed no emotion during the trial. The three men sentenced to death, Iskandar Ehet, Turgun Tohtunyaz and Hasayn Muhammad, had been charged with organizing and leading a terror group and murder.

The woman, Patigul Tohti, the only assailant captured alive at the scene of the attack, was convicted on the charges of joining a terror group and murder. The court said Tohti could not be sentenced to death because she was pregnant.

The Kunming court said the suspects, influenced by religious fundamentalism, were part of a terror group that plotted the March 1 attack, when five knife-wielding assailants hacked 31 people to death and injured another 141 people.

Local authorities arrested Ehet, Tohtunyaz and Muhammad two days before the attack as they were attempting to illegally leave China, the court said.

Having lost the contact with the three men, five other members of the group mounted the attack as planned, the court said.

Police shot dead four attackers and captured Tohti on the scene, the court said.

Beijing has blamed religion-influenced terrorists with foreign ties for the Kunming attack and other violence that has caused hundreds of deaths this year in and outside Xinjiang.

Critics say China's repressive ethnic policies and practices as well as economic disenfranchisement have alienated the Uighurs, possibly driving them into religious extremism.

In a written statement, Dilxat Raxit, spokesman for the advocacy group World Uyghur Congress, said China should review its ethnic policies.

"China is shunning the issue that many Uihgurs are choosing to escape the country when they cannot bear the persecution," Dilxat Raxit said.