The company which makes Mars and Snickers chocolate bars announced yesterday it will stop marketing its products to children under the age of 12.

Masterfoods, which also makes Bounty, M&Ms and Maltesers, has confirmed it will not produce adverts for magazines or television programmes which are aimed at youngsters.

The new policy will cover all its confectionery and food products, except its "better for you" range, and will also apply to online and new media advertising. The move was made in response to soaring obesity rates across the UK and is expected to be carried out by the end of the year.

A spokesman for the company said: "Over the last few years, concerns have been expressed by governments and parents about the marketing of products to children.

"Mars believes that it is important to listen to concerns and respond directly, in keeping with our desire to support the paramount role of parents in making purchasing decisions about foods on behalf of their children.

"We have therefore decided that we will not direct communications about our core food and confectionery products to children under the age of 12, with the exception of our better for you' products which meet regional nutritional guidelines, where the cut-off will be nine.

"Also, we will not participate in promotions primarily directed to children under 12, again with the exception of products we intend to develop to meet the specific nutritional interests of children." Obesity rates among children have soared in recent years. Figures released by ISD Scotland for 2005-06 show 21.8% of children in primary one are overweight. At the age of three-and-a-half, 20.7% are overweight, including 8.6% who are obese and 4.1% who are severely obese.

Professor Gerard Hastings, director of the Institute for Social Marketing at Stirling University, carried out a review of food promotion and children for the Food Standards Agency in 2003.

He said food marketing did influence children's choices and, although the decision by Masterfoods was to be welcomed, other companies needed to follow suit.

"It is well established that advertising of such foods does influence children and encourage them to eat an unhealthy diet. I do welcome the decision but it is a shame that we have to rely on one company to do this rather than do it across the board as a matter of regulation," he said.

Masterfoods previously had a policy of not advertising to children under the age of six. Its rival, Nestle, does not have an age limit on advertising, but the company says it does not encourage "overeating" in children. PepsiCo, which sells crisps and snacks as well as soft drinks, does not have an age limit.

The Union of European Soft Drinks Association, which represents Coca-Cola among others, launched a marketing code last year promising to end advertising targeting under-12s. It came two years after Coca-Cola pledged to withdraw its advertising from vending machines in Scottish secondary schools.