A Chinese court has condemned two men to death and sentenced a company boss to life for their roles in the production and sale of poisoned milk that killed at least six children and made almost 300,000 sick.

But angry parents said that jailing Tian Wenhua, the former head of Sanlu, was too lenient and she should have been executed too.

More than 50,000 infants were hospitalised with kidney problems after drinking Sanlu baby formula tainted with melamine, a chemical normally used to make plastics and fertiliser.

Investigators said middlemen who bought milk from farmers and sold it on to dairies had watered it down and mixed it with the chemical, which creates the appearance of higher protein levels in quality tests.

The intermediate people's court sentenced 40-year-old Zhang Yujun to death for making and selling over 600 tonnes of "protein powder" laced with melamine. Prosecutors said during the trial that he was "fully aware of the harm" it created.

Geng Jinping was given the death penalty for producing and selling toxic food. The official China Daily website said he added the powder to milk.

A third man received a suspended death sentence, which is usually commuted to life in prison.

The heavy sentences reflect the outrage across China caused by the case, not only because children were affected and because it taps into potent food safety fears, but because local officials covered up the problem for at least a month after Sanlu alerted them.

Dozens of police today guarded the courthouse in Shijiazhuang, the industrial city south of Beijing where Sanlu was based.

Activists said officers detained two parents to stop them attending the trial. Families say they have been put under pressure to drop a compensation suit.

The verdicts and sentences were closed to the public, but a court spokesman briefed reporters outside.

Tian, the most senior official charged, pleaded guilty to producing and selling fake or substandard products. During her trial in December she admitted having known of problems with her company's products for months before telling authorities.

Parents had contacted the company to complain as early as the end of 2007. But the scandal was not exposed until September 2008.

Tian was fined 20m yuan (£2.12m) while Sanlu, which has been declared bankrupt, was fined 50m yuan.

State media said the charges against her did not carry the death penalty.

Zheng Shuzen, who said her granddaughter died of kidney failure after drinking Sanlu milk formula but was not included in the list of victims, told Reuters that Tian "should have been shot".

"So many children died but they kept the official number down so that she could get life [in jail], not death."

Zhao Lianhai, who has set up a website for parents whose children fell ill, told the Associated Press: "We think Tian Wenhua's sentence is just the beginning. As victims' parents, we want justice for our children and we will call for it through reasonable and sensible means."

Courts sentenced a total of 21 people involved in the scandal today. Two more defendants received life sentences and three former Sanlu executives, including one who uses a wheelchair after a failed suicide attempt last year, were given between five years and 15 years in prison.

Earlier this week, state media reported that the parents of the first Chinese child killed by the tainted formula had given up their right to sue in exchange for 200,000 yuan.

Sanlu and 21 other dairy companies involved in the scandal have proposed a 1.1bn yuan (£115m) compensation plan. But more than 200 families are suing, saying that the money offered is insufficient and that they want to guarantee their children long-term treatment for their health problems.

Zhao said several families would travel to Beijing tomorrow to deliver a petition to the ministry of health because the compensation offer did not include enough long-term help.

The scandal led to the screening of more than 20m babies for kidney problems, officials have said. It triggered a spate of product bans or recalls around the world after melamine was detected in exports such as chocolate, yoghurt and sweets.