In this July 23, 2013 photo, Chinese security personnel try to subdue a knife-wielding man outside the family planning office in Dongxing city in southwest China's Guangxi province. Local media report that the man attacked the local family planning office killing two officials and injuring another four after being refused a residency permit for his fourth child that he fathered in violation of China's one-child policy. BEIJING (AP) - A man who was told by officials they couldn't register his fourth child because he didn't pay a penalty for breaking China's family planning laws stabbed to death two government workers and injured four others, state media and an official said. Footage of police trying to subdue the man outside a family planning office in southern China's Guangxi region while he still brandished a machete was widely available on Chinese news websites and shared on social media Wednesday. The incident this week is one of a string of grievances against symbols of authority in China that have turned violent in recent months. It also illustrates how disliked China's family planning limits are, more than 30 years after their introduction limited most urban couples to one child and rural families to two. Many comments on China's Twitter-like sites voiced sympathy for the man and their opposition to the one-child policy, with some calling on the government to get rid of it. A family planning official said Wednesday that a man and a woman at the office died in the attack and four other workers were injured, including a woman who had her right hand cut off. The official from the Family Planning Commission of Fangchenggang city said the suspect was certified mentally disabled. As is common with Chinese officials, she gave only her surname, Li. Footage broadcast on Guangxi TV showed police wearing helmets using long metal bars to bring a man with a machete resisting them under control. Authorities said the suspect had been detained. According to the official Xinhua News Agency, staff in the Dongxing City Family Planning Bureau - which comes under Fangchenggang city - refused Monday to register the man's fourth child for a hukou, or resident's certificate, because he hadn't paid a social compensation fee. The fee is a fine levied on parents who break family planning laws and can be up to 10 times a family's annual income, depending on the province and the whim of the local planning bureau. A child without a hukou faces a multitude of problems because the certificate is needed to register for education, health care and government benefits. Tuesday's Xinhua report, which cited an initial investigation by the Dongxing municipal government, identified the man as having the surname He. On Tuesday morning, He is believed to have broken into the building and attacked the six victims, Xinhua said, adding that the man is a villager and has one son and three daughters. It wasn't immediately clear whether he had previously paid a social compensation fee. Although often known as the "one-child policy," China's family planning laws allow families in rural areas to have a second child if their first is a girl. China has seen a number of recent cases in which people who have been unable to find redress for their grievances have turned to violence to attract attention. Though many commentators on Chinese blogs and media have condemned the use of violence, there has also been an outpouring of sympathy for these individuals, who are seen as having been failed by authorities. On Saturday, a motorcycle taxi driver detonated a homemade bomb at Beijing's main airport after eight years of frustration trying to seek redress for an attack by city guards that left him paralyzed and in debt, according to his brother. Last month, a man aged about 60 reportedly chronicled online his unsuccessful efforts to get a local police station to correct his age so he could be eligible for social security payments, then a day later set fire to a crowded commuter bus, killing 47 people.