The European Court of Justice (ECJ) issued a ruling on Tuesday saying a European directive that would allow the British government to enact plain packing rules was lawful - if deemed so UK courts.

The ECJ took up the case involving Philip Morris, British American Tobacco and the UK government by examining the legality of rules on tobacco product packaging, health warnings and a ban on flavored cigarettes.

"The court finds that, in providing that each unit packet and the outside packaging must carry health warnings ... the EU legislature did not go beyond the limits of what is appropriate and necessary," the court said in its ruling.

Following the first attempt by cigarette companies to void the regulation, in December, Advocate General of the ECJ, Juliane Kokott, wrote that the tobacco directive of 2014 was indeed lawful. The statute restricts severely what is allowed on cigarette packaging and how large health warnings must be, tightens previously lax rules on e-cigarettes, and prohibits the sale of flavored cigarettes - including menthols.

Kokott's opinion dismissed concerns from Philip Morris that the European parliament had infringed on free market and trade regulations, saying that in her view "the EU legislature did not exceed the considerable latitude to be given to it in ensuring that tobacco and related products may be placed on the market under uniform conditions throughout the EU without losing sight of the fundamental objective of a high level of health protection."

This is the second big defeat for Philip Morris in 2016. In March, the German government adopted a new law that will see images of teeth and lungs plagued by tobacco damage cover boxes of cigarettes. Similar laws are already on the books in countries like the UK and Canada, both of which have a lower rate of tobacco consumption than Germany. Tobacco companies initially fought for a longer transition period for the legislation to come into effect, but this was rejected by parliament and German smokers can expect to see the gruesome images on their packs of cigarettes beginning on May 20.