The European Union Wednesday passed a tobacco-control law that will ban flavored cigarettes, require bigger warning labels on packets and, for the first time, regulate electronic cigarettes on a European level.

The bloc's 28 countries have two years to write the new regulations into national law, at which point they will come into effect.

About 28% of Europeans smoke and every year the habit kills some 700,000 of them, according to the European Commission, the EU's executive arm. The main objective of the new law is to stop young people from taking up smoking, since even under the commission's own estimate it will get very few existing smokers to quit.

Under the new law, warning labels have to cover at least 65% of a cigarette pack's surface. Individual governments are allowed to go even further, for instance by preventing cigarette makers from displaying branding. The U.K. and Ireland have said they want to adopt such "plain-packaging" laws.

Special additives that make cigarettes more addictive or easier to smoke, such as sweet flavorings, will also be banned. There is an exception for menthol cigarettes, which will remain legal until 2020.

Much of the back and forth over the new law in recent months was dominated by how to treat e-cigarettes, battery-powered devices that turn nicotine-laced liquids into vapor. Health ministers this summer voted to regulate e-cigarettes as medical products, just like nicotine gum and patches. That would have subjected the devices and the so-called e-liquids they vaporize to extensive medical testing and, in some countries, restricted their sale to pharmacies.

That plan led to an outcry from e-cigarette makers and users, or "vapers," which successfully lobbied the European Parliament into advocating much more light-touch regulation.

In the end, member states and the parliament agreed to treat e-cigarettes as consumer products, although individual governments can still decide to regulate them as medicines within their own borders. If they count as consumer products, e-liquids can only come with a tobacco flavor - and for the transition period with menthol flavor - and will have to carry warnings on the addictiveness of nicotine.

E-liquids will be limited to no more than 20 milligram of nicotine per milliliter, which after five minutes of "vaping" deliver about the same level of nicotine as one cigarette. Cartridges, which, similar to ink cartridges for a fountain pen, allow vapers to replenish their e-cigarettes, can't be bigger than 2 ml.

Refillable cartridges will also remain legal for now, despite concerns that they could allow users to consume drugs other than nicotine or lead children to accidentally swallow dangerous quantities of nicotine. However, if at least three member states decide to ban refillable cartridges or certain types of e-cigarettes, the commission can extend that ban to the EU.