The European Union has ruled that Luxembourg did not give McDonald’s a special tax deal and that the non-taxation of some of its profits did not amount to illegal state aid.

The EU Commission ended a probe that started in 2015 by saying that advantages granted to McDonald’s were the result of differences between Luxembourg and US tax laws, and EU Commissioner Margrethe Vestager said “Luxembourg did not break EU state aid rules”.

Under the complicated tax structure in Luxembourg and the United States, McDonald’s avoided to pay taxes on some profits on both sides of the Atlantic.

Ms Vestager said the investigation “has shown that the reason for double non-taxation in this case is a mismatch between Luxembourg and US tax laws, and not a special treatment by Luxembourg”.

The outcome stands in stark contrast to similar cases between the EU and other US giants since the EU ruled two years ago that Apple was getting preferential treatment from the Irish government and forced it to pay 13 billion euro (£11.5 billion) in back taxes.

The EU handed similar tax rulings to several other companies, though the amount of back tax was smaller. Last year, the EU said Amazon had to repay £224 million after it allegedly had struck a special tax deal with Luxembourg.

The EU wanted to see whether the McDonald’s case was a similar example where too few taxes were paid overall and where other companies unfairly did not get the same treatment as big multinationals.

The EU said that from 2009 to 2015, the food giant’s Luxembourg-based company McDonald’s Europe Franchising paid no corporate tax in Luxembourg despite large profits. It said the profits were more than 250 million euro (£222 million) in 2013 alone.

McDonald’s set up a structure where its Europe Franchising company is a subsidiary of the US based McDonald’s Corporation — yet also has a branch in the United States.

Ms Vestager said that even though Luxembourg did not break state aid rules, a broader view needed to be taken.

“Of course, the fact remains that McDonald’s did not pay any taxes on these profits — and this is not how it should be from a tax fairness point of view,” Ms Vestager said.

The Luxembourg government said that even though it was cleared of wrongdoing in this case, it was updating its tax laws because it realised they no longer represented the spirit of the times when there should be more accountability of multinationals.