Luxembourg (AFP) - The EU's top court on Thursday annulled a farm trade deal between the European Union and Morocco because it illegally involved the disputed region of Western Sahara.

In its decision, the European Court of Justice said the trade deal signed in March 2012 between the north African country and the EU failed to explicitly refer to Western Sahara, leaving open the possibility that the accord would apply in the disputed region.

"We are examining the ruling carefully. We need to do that in order to consider carefully how to proceed further, including on the possibility of an appeal," a spokeswoman for the European Commission said in an email to AFP.

The case was brought to the Luxembourg-based court by the Polisario Front, a movement in Western Sahara that has been campaigning for independence for decades with the backing of Morocco's arch-rival Algeria.

"This judgement shows how clear-cut the Western Sahara case is legally. Neither Morocco nor the EU have the right to exploit the resources of Western Sahara," the pro-Polisario group Western Sahara Resource Watch said in a statement.

Morocco took control of most of the territory in November 1975 after the end of Spanish colonisation, unleashing a war for independence that lasted until 1991.

A UN-brokered ceasefire between Morocco and the Polisario has held since then, but UN efforts to organise a referendum on the territory's future have been resisted by Rabat.

Two other cases introduced by the Polisario Front are also currently being dealt with by the same EU court.