A decision by a top European court to annul a trade deal between the European Union and Morocco could have major implications for the future of Morocco’s agricultural exports to the EU.

In a case brought by the Algerian-backed Plisario Front independence movement, the EU’s General Court ruled on Thursday that the trade agreement should not apply to Western Sahara, a disputed territory under Morocco’s control since 1976. The country has invested heavily in horticultural development in the region and it now supplies a large volume of the fruits and vegetables Morocco exports to the UE.

In the ruling, the court said the EU had failed to carry out its duties to ensure it considered all aspects of the deal, including its impact on the fundamental rights of the people of Western Sahara and who controls the region’s natural resources.

Officials said the judgement should have no immediate effect on EU-Moroccan trade, which reached almost €30bn in 2014.

The EU has two months in which to appeal the ruling.

“We are examining the ruling carefully. We need to do that in order to consider carefully how to proceed further, including the possibility of an appeal,” Catherine Ray, spokesperson for EU foreign policy chief Federica Mogherini, told the Wall Street Journal.

The EU imported 757,200 tonnes of Moroccan fruits and vegetables between January and September this year, 3 per cent more than in the same period of 2014. The value of imports increased by 18 per cent to €910.8m.