The United Nations' highest court ruled on Friday that Italy's courts were wrong to allow victims of Nazi war crimes to claim compensation against Germany because it has legal immunity from being sued.

The ruling by the International Court of Justice in The Hague is expected to end a wave of claims for damages stemming from a Nazi massacre in Italy during World War Two, and will also prevent other countries such as Greece from using Italy's courts to pursue a flood of similar compensation claims.

Italy's top court ruled in 2008 that Germany should pay around 1 million euros in compensation to the families of nine victims of the killings, committed by the German army in Civitella, Tuscany. A total of 203 people died in the 1944 massacre.

The Italian Republic has violated its obligation to respect the immunity which the Federal Republic of Germany enjoys under international law by allowing civil claims to be brought against it based on violations of international humanitarian law committed by the German Reich between 1943 and 1945, the ICJ said in a statement.

The ICJ, set up in 1945 as a world court for disputes between nations, said that Italy must now ensure that decisions taken by its courts which infringed Germany's immunity under international law must cease to have effect.

In a way, we expected it, Italy's representative, Paolo Pucci di Benisichi, told reporters after the ruling.

Germany has paid billions of euros in reparations and compensation since the end of World War Two.

It filed a lawsuit against Italy at the ICJ in December 2008 saying that an Italian court erred in ordering Berlin to pay damages for the massacre and that by allowing the ruling to stand, hundreds of additional cases could be brought against it by private individuals.

(Reporting by Sara Webb; Additional reporting by Svebor Kranjc in The Hague; Editing by Alison Williams)