China executed a dairy farmer and a milk salesman Tuesday for their roles in the sale of contaminated baby formula - severe punishments that Beijing hopes will assuage public anger, reassure importers and put to rest one of the country's worst food-safety crises. The men were the only people put to death in a scheme to boost profits by lacing milk powder with the industrial chemical melamine; another 19 were convicted and received lesser sentences. At least six children died after drinking the adulterated formula, and more than 300,000 were sickened. Beijing is eager to prove it has responded swiftly and comprehensively to eliminate problems in its food-production chain that have spawned protests at home and threatened its export-reliant economy. The milk-powder contamination struck a nerve with the public because so many children were affected, but was only one in a series of product recalls and other embarrassing disclosures of lax public-health safeguards. Melamine, which is used in the manufacture of plastics and fertilizers, has also been found added to pet food, eggs and fish feed, although not in levels considered dangerous to humans. The chemical, which like protein is high in nitrogen, fooled inspectors. It can cause kidney stones and kidney failure. China has since tightened regulations and increased inspections on producers and exporters in cooperation with US officials, who have noted a drop in the number of product recalls on Chinese exports. But Beijing continues to struggle to regulate countless small and illegally run operations, often blamed for introducing chemicals and additives into the food chain. The country has 450,000 registered food-production and -processing enterprises, but many - about 350,000 - employ just 10 people or fewer. The UN said in a report last year that the small enterprises present many of China's greatest food-safety challenges. Zhang Yujun, the farmer, was executed for endangering public safety, and Geng Jinping for producing and selling toxic food, according to the official Xinhua News Agency. Much of the phony protein powder that Zhang and Geng produced and sold ended up at the now-defunct Sanlu Group Co., at the time one of China's biggest dairies. Xinhua said an announcement of the execution had been issued by the Shijiazhuang Municipal Intermediate People's Court. Most executions in China are performed by firing squad. Of the others tried and sentenced in January in connection with the scandal, Sanlu's general manager, Tian Wenhua, was given a life sentence after pleading guilty to charges of producing and selling fake or substandard products. Three other former Sanlu executives were given between five years and 15 years in prison.