UK tax laws, which stop companies offsetting overseas losses against domestic profits, are in breach of EU rules, a judge has ruled.

The landmark case brought by Marks & Spencer could cost the Government millions in enforced tax-regime changes if yesterday's "opinion" by an Advocate- General at the European Court of Justice is upheld in a final ruling later this year.

Lawyers for the multinational retailer argued that differences in tax treatment between domestic and foreign branches of the same company violated EU laws on "freedom of establishment".

Under UK tax legislation, a multinational company resident in the UK is allowed to offset losses against profits where the losses occur in the UK.

But if the losses are abroad, they cannot be offset against UK profits.

M&S, resident for tax purposes in the UK, suffered serious losses in several of its foreign branches in the late 1990s, and the company sought "group relief" under UK tax laws.

But the claim was refused on the ground that "group relief" only applied to losses in the UK.

The High Court sent M&S's appeal to the European Court for a ruling on EU law.

Yesterday, Advocate-General Poiares Maduro said that a group tax-relief scheme which does not allow a parent company to deduct the losses of its foreign subsidiaries under any circumstances is incompatible with EU law.

But such a scheme would be in line with EU rules on "freedom of establishment" if the right to deduct such losses were conditional on an agreement that the losses could not also be deducted in the country where the subsidiary is based.

The aim of the UK "group relief" scheme was to prevent a "two-fold advantage" being obtained: it allowed losses to be transferred, but to block the same losses being used for tax purposes.

But a general prohibition far exceeded what was necessary to protect the "cohesion" of a group scheme, went on the Advocate-General.

The "opinion" is not legally binding, but the judges follow the Advocate-General's advice in about 80 per cent of cases coming before the European Court.

The final verdict is expected later in the summer, and if Marks and Spencer wins the case, company tax laws in most EU countries affecting multinationals may have to change.

The case is the latest in a series referred to Luxembourg by UK courts questioning the compatibility of UK tax law with EU rules.

The European Federation of Accountants (FEE) says there are substantial differences in the treatment of domestic and foreign company losses not just in the UK but in most EU member states.

"It is a barrier to the principle of free establishment as it implies a bias in favour of domestic investment" said FEE vice-president Stefano Marchese.

Marks & Spencer made its original application for tax relief to the Inland Revenue in March 2000 and said it would gain over £30 million from a ruling in its favour.

"We are encouraged by the advocate general's opinion and we now await the ECJ's decision later this year," an M&S spokeswoman said.