BEIJING—Flashing police cars guarded Beijing schools Tuesday and officers in another city were told they could shoot to kill to stop assaults on students, as Chinese authorities tried to assert control after three attacks last week left dozens of children injured. The government also banned further media coverage of the attacks, a watchdog group said.

Tuesday was the first day of classes in China since a farmer hit five elementary students with a hammer on Friday in the eastern city of Weifang before burning himself to death in the latest of the back-to-back attacks on children that shook the country.

"I was a little worried after seeing those reports on TV about the attacks," said Liu Xingwu, who took his 7-year-old granddaughter by bicycle to Shijia Elementary School in central Beijing. "The security measures are good. But we've also told her to be careful."

The government has sought to appear on top of the situation, with senior leaders urging improved school safety. But experts say the violence indicates a lack of support for the mentally ill in rapidly changing Chinese society and that official efforts so far have failed to address the social inequalities believed to have driven the violence.

Child safety touches a nerve particularly among people in the urban middle class, who invest huge amounts of money and effort in the education and care of their children. Most Chinese have only one child under the country's population control laws.

Recent scandals in which children have been the main victims have sparked public anger and occasional protests, such as when at least 3,000 children around the country were found to have lead poisoning from polluting factories built too close to villages, and in 2008 when tainted baby milk powder sickened more than 300,000 infants.

China's recent string of school attacks started when a man stabbed eight elementary schoolchildren to death in March in Fujian province. He was executed on April 28, the same day a 33-year-old former teacher broke into a primary school in the southern city of Leizhou in Guangdong province and wounded 15 students and a teacher with a knife.

The next day in Taixing city in Jiangsu province, a 47-year-old unemployed man armed with an 8-inch (20-centimeter) knife wounded 29 kindergarten students -- five seriously -- plus two teachers and a security guard.

China's education ministry on Tuesday again urged improved school safety, including guards with protective gear and patrols at the beginning and end of the school day.