UK prime minister Boris Johnson is pressing ahead with a ban on junk food advertising on television before 9pm and online at all times from the end of 2022 to fight childhood obesity, in spite of ministerial resistance and industry anger.

Oliver Dowden, culture secretary, and Liz Truss, international trade secretary, are among ministers who voiced concern over the policy, which will hit media companies and food and drink makers.

“Dowden is jumping up and down about it,” said one government official. Another official said: “The health benefits appear to be marginal and Liz Truss is instinctively opposed to this kind of government ban.”

Although the policy was eventually agreed by ministers, officials said there was widespread surprise at the apparently small health gains that the government estimated would flow from the ban.

The government’s impact assessment estimates the average British child will consume between 0.1 and 3.9 fewer calories per day as a result of the advertising curb. Children in the UK aged seven to 10 typically consume between 1,500 and 2,000 calories per day.

The government predicted that the policy would generate £2.3bn of health benefits over 100 years, adding that there was “significant uncertainty” in calculating the benefits. Officials said the initiative “could reduce the number of obese children by more than 20,000”.

Johnson, who once railed against the “continuing creep of the nanny state” is backing the move. The prime minister, who was seriously ill with Covid-19 last year, partly blamed his health problem on being “a fatty” in his fifties.

Some senior Conservatives believe there will be a backbench Tory rebellion when the advertising ban comes before MPs as part of the forthcoming health bill.

The plans have prompted outcry from food manufacturers and advertisers. Sue Eustace, public affairs director at the Advertising Association, a trade body, said the group was “dismayed”.

“This means many food and drink companies won’t be able to advertise new product innovations and reformulations and larger food-on-the-go, pub and restaurant chains may not be able to tell their customers about their menus,” she said.

“Content providers — online publishers and broadcasters — will lose vital advertising revenue to fund jobs in editorial and programme-making,” added Eustace.

The government estimates broadcasters will lose about £66.3m a year in advertising revenue as a result of the restrictions, while for online platforms the figure is £178m.

Kate Halliwell, chief scientific officer at the Food and Drink Federation, which represents the industry, also criticised the proposal.

“[It] would make it difficult to advertise many products that have been carefully reformulated or created in smaller portions in line with the government’s own targets; for example, Cadbury would not be able to advertise their 30 per cent reduced sugar Dairy Milk,” she said, adding that businesses would not have enough time to prepare for the changes.

Brands will be barred from advertising products high in fat, salt and sugar before the watershed and running paid-for digital ads at any time, with exemptions for small businesses and products, such as honey, olive oil and avocados.

The announcement of what will be some of the world’s toughest food advertising restrictions follows a move to ban the promotion of unhealthy food in shops, including “buy one, get one free” offers and the placement of items near checkouts.

The government said: “Current advertising regulations are not going far enough to protect children from seeing a significant amount of unhealthy food adverts on TV, and existing regulation does not account for the increasing amount of time children are spending online.”

Brand-only advertising, such as by fast-food outlets, will still be allowed, while companies can continue to promote junk foods on their own websites and social media accounts.

Foods covered by the ban range from soft drinks and crisps to sugary breakfast cereals, cakes, pizza and biscuits. The government has issued a list of products affected, following warnings that more sweeping criteria might take in healthy foods such as honey and avocados.

Companies with fewer than 250 employees will still be able to advertise unhealthier foods, to help them recover from the economic impact of the pandemic.

Jo Churchill, public health minister, said: “We need to take urgent action to level up health inequalities. This [decision] . . . will help to wipe billions off the national calorie count and give our children a fair chance of a healthy lifestyle.” Health campaigners welcomed the new restrictions.

Additional reporting by Alex Barker