Smoking in cars in the presence of children is to be outlawed in England by the end of the year, Downing Street has signalled, after MPs voted overwhelmingly to make it a criminal offence.

A No 10 source said Parliament had made its view clear and ministers are now looking at the practicalities of implementing the ban, with a view to getting it place before 2015.

The Commons voted by 376 to 107 last night - a majority of 269 - to give the Health Secretary the power to impose a ban in England. It also allows the Welsh government to introduce it in Wales.

It passed despite the opposition of a number of senior ministers - including Home Secretary Theresa May and Justice Secretary Chris Grayling - who were given a free vote.

The vote was warmly welcomed by medical campaigners, who have long pressed for the measure to protect children from the effects of second-hand smoke in the confined space of a car.

Dr Penny Woods, chief executive of the British Lung Foundation, said: "The introduction of a law that would help prevent hundreds of thousands of children from being exposed to second-hand smoke in the car is now within reach.

"With both Houses of Parliament having made their support for the ban clear, the onus is now on the Government to act accordingly and make this crucial child protection measure law at the earliest opportunity."

Simon Clark, director of the smokers' group Forest, said he was "disappointed but not surprised" by the decision and accused the Government of being "spineless".

He said: "Legislation will have very little impact because so few adults still smoke in cars carrying children. Those that do will carry on because it will be very difficult to enforce.

"Government has banned smoking in public places. Now they're going to ban it in a private place. The home will be next."

Prime Minister David Cameron missed the vote while visiting flood-stricken areas in the South West.

Mr Cameron's official spokesman declined to say which way the Prime Minister would have voted if he had been able to attend Parliament.

But he told a regular Westminster media briefing: "While he understands the concerns that some have expressed, his view is that the time for this kind of approach has come."

Asked whether Mr Cameron was concerned about people smoking in their homes when children were present, the Prime Minister's official spokesman told a Westminster media briefing: "When it comes to the choices people make at home, that is a matter for them.

"There is a particular issue around vehicles being a particularly confined space, with associated public health concerns."