Onlookers wonder what could have motivated such a brutal attack
A man has been sentenced to death by a court in Shanghai for killing six police officers in a frenzied knife attack on 1 July.
Yang Jia, 28, was convicted of premeditated murder, according to state news agency Xinhua.
Police say Yang confessed to the attack, and claimed to have been maltreated at the same police station during questioning for a bicycle theft.
The case has provoked an unusual level of controversy.
Incidents of such violent crime are rare in China, and onlookers have been wondering whether police abuses could account for the severity of Yang's attack.
Yang was tried on 26 August in the Shanghai No 2 People's Intermediate Court, but this is the first official word on the outcome.
Proceedings were closed to foreign journalists and lawyers also refused comment.
Yang had previously been questioned at the police station over a theft
Yang's attack began when he threw Molotov cocktails at a security guard at the entrance of the police station and got inside.
He then slashed several police officers.
Six policemen died, while another four people were seriously hurt.
Despite strong support for the death penalty in China, public unease with this case was reflected outside the court, where residents gathered to get news of the verdict.
"Why is this so secret?" asked a man who identified himself only as Wang.
"The government should make this more open so justice can be served. Now people are wondering whether this trial was conducted fairly or not," he told Reuters news agency.
Yang is said to have been motivated by bitterness over his treatment by police while being interrogated over the theft of a bicycle last year.
One report suggested he claimed to have been beaten, but police and court officials have refused to comment.
It is not known whether Yang plans to appeal.