BEIJING (AP) — China says a court has imposed a death sentence on a man who killed two government workers and injured four other people in an argument related to the one-child policy.

Xinhua News Agency says a court in southern Guangxi region convicted He Shenguo of intentional homicide.

He slashed people at a family planning office after it refused to register his fourth child because he hadn’t paid a fine for breaking family planning rules.

Footage of police trying to subdue the man while he brandished a machete in July last year was widely shared on social media. Many comments at the time voiced sympathy for him and opposition to China’s family planning limits.

Since then, the government has slightly relaxed the policy to allow more people to have two children.