Tony Blair has said he would consider banning the advertising of junk food to children to boost public health.
Almost a third of children in the UK are now overweight
The prime minister said he wanted to give the food industry a chance to prove it could regulate its own ads.
But if in a year's time new guidelines were judged not to be working he would consider legislation, he told the BBC.
Media regulator Ofcom is consulting on restricting junk food ads but has already ruled out the option of a pre-9pm broadcast ban.
The Food Standards Agency (FSA) says three options set out so far by media watchdog Ofcom do not go far enough and banning ads for products like crisps and fizzy drinks would help protect children's health.
It is estimated that 14% of children in England are clinically obese.
Speaking ahead of a speech in Nottingham on the role of the state in encouraging healthy lifestyles, Mr Blair said he has become less worried about accusations that he is running a nanny state.
"I think I used to be very much in the bracket of those who say "the nanny state" - it is not for the state to tell us what to do," he told the BBC's Mark Easton.
But, he added, successful anti-smoking campaigns and the campaign to make school dinners more healthy had helped to change his mind.
And with the advertising of junk food to children - and "the way the drinks industry behaves" - he thought it was important for ministers to encourage a "greater sense of responsibility".
He said the government was seeking to agree a voluntary code with the food industry on advertising to children.
But he added: "If the voluntary code doesn't work, then I think we should look at whether it is right to place restrictions on selling junk food to kids."
Unless the government could get people "to take some sort of responsibility for their own health" obesity and alcohol abuse will cost the country "billions", added Mr Blair.