The Department of Health is now drawing up plans to turn the vote into legislation. The Prime Minister’s official spokesman said the Government’s intention was for the ban to “be in force ahead of 2015”.
The move was approved by 376 to 107, a majority of 269, in a free vote which had divided the Cabinet.
It gave authority for Jeremy Hunt, the Health Secretary, to introduce a ban in England and for the Welsh Government to take the same step.
The vote passed despite the opposition of several senior ministers including Theresa May, the Home Secretary, Iain Duncan Smith, the Work and Pensions Secretary, and Chris Grayling, the Justice Secretary.
The outcome pleased health campaigners who said it would help to protect hundreds of thousands of children from the effects of exposure to second-hand smoke.
But critics complained that the planned law would be difficult to enforce and would represent an unreasonable incursion by the state into private lives.