The European Union has declared that Volkswagen scrap a German law which protects it from hostile takeovers.

The advocate lawyer at the EU Court of Justice (ECJ) said the German legislation on Volkswagen was illegal because it blocked foreign investors from buying shares and prevented them from winning control of the company.

Under the law, any shareholder in the carmaker cannot exercise more than 20% of the firm's voting rights, regardless of the level of shares they own.

A senior labour leader at VW expressed disappointment at the ruling, but the company's biggest shareholder Porsche, which has a 24.7% stake, welcomed the decision.

The initial ruling is expected to become the court's final judgement which is expected in four to six months time.

Bernd Wehlauer, deputy head of VW's works council, said he had expected such a decision but cautioned it was only a recommendation and could be overturned by the ECJ.