The European Union has sparred with multinationals like Apple and Amazon as well as countries such as Ireland in its efforts to curb tax avoidance. In the case of McDonald’s, it is standing down.

The European Commission, the bloc’s executive arm, had been examining whether a deal that Luxembourg granted to McDonald’s may have led to the fast food chain’s paying less tax than it owed. The commission said Wednesday that these deals did not constitute illegal state aid.

The profits under scrutiny had not been taxed in Luxembourg or the United States, according to the commission, but it said that this was a result of a mismatch between the countries’ tax laws rather than special treatment from Luxembourg, and that no rules had been broken. Still, Margrethe Vestager, the European Union’s competition commissioner, said that it was important that Luxembourg change its laws to ensure profits do not go untaxed regularly.

“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 in a statement. “That’s why I very much welcome that the Luxembourg government is taking legislative steps to address the issue that arose in this case and avoid such situations in the future.”