BRUSSELS, April 11 (Reuters) - Britain's fight against an EU order to recover millions of euros from the London Stock Exchange, ITV and other multinationals that benefited from an illegal exemption in a British tax scheme got a boost on Wednesday from an adviser to Europe's top court.

Advocate General Laila Medina at the Luxembourg-based Court of Justice of the European Union (CJEU) said judges should annul the European Commission's 2019 decision against the United Kingdom's illegal tax rulings granted to certain multinational groups between 2013 and 2018.

The Commission, which acts as the competition enforcer in the 27-country bloc, said Britain's Controlled Foreign Company (CFC) rules aimed at attracting companies to set up headquarters in Britain and discourage British companies moving offshore, gave these firms an illegal advantage.

The decision was issued prior to Britain's withdrawal from the EU. A lower tribunal upheld the Commission's decision in 2022 following a challenge by the British government and ITV.

Britain, ITV and two companies of the London Stock Exchange Group subsequently appealed to the CJEU.

Court adviser Medina faulted the EU executive and the General Court's legal errors.

"Both the Commission and the General Court erred in law when considering that the Controlled Foreign Company (CFC) rules, instead of the general UK corporation tax system as a whole, were the correct reference framework for examining whether a selective advantage had been granted," she said.

"Indeed, the CFC rules can only be fully understood when considering the UK corporate tax system as a whole."

Judges, who will rule in the coming months, typically follow the majority of such non-binding opinions.

The joined cases are C-555/22 P, C-556/22 P and C-564/22 P | United Kingdom v Commission and Others. (Reporting by Foo Yun Chee; Editing by Angus MacSwan)