The European Union's top court ruled on Wednesday that the Palestinian political party Hamas should remain on the EU terrorism blacklist, referring the case back to a lower court.
Judges at the European Court of Justice (ECJ) overruled the General Court's view of 2014 that the 28-nation bloc had insufficient evidence to maintain asset freezes and travel bans on Hamas.
That court had found that the listing was based on media and internet reports rather than solid legal arguments.
However, the ECJ said on Wednesday that a decision by a competent authority was only required for an initial listing, with no such condition for subsequent retention.
The Hamas ruling came as a surprise since once of the ECJ's senior lawyers had said in an opinion last September that Hamas should not have been included on the terror list because procedural mistakes invalidated the EU decision.
It said that rather than establishing independently that Hamas was a terrorist organisation, the European Council of EU member states had instead relied on publicly available information.
The court rarely rules against the advice of its top lawyers and there had been concerns that if the ECJ agreed with the General Court, then already tense EU-Israel relations would have been hit again.
The European Union imposed travel bans and asset freezes on Hamas in 2001.
Hamas opposed the sanctions from the start, arguing that it is a legally elected government.
It has controlled the Gaza Strip since 2007.
Israel has conducted several "operations" on the Gaza strip, the latest of which was Operation Protective Edge in 2014, in which more than 2,100 Palestinians, the vast majority of whom were civilians, were killed.
About 66 Israeli soldiers, and seven Israeli civilians also died.
The EU maintains an active sanctions policy, targeting individuals, groups and states, including several other Palestinian entities.
In a related ruling, the ECJ said on Wednesday that the General Court's 2014 finding that Sri Lankan rebel group the Liberation Tigers of Tamil Eelam (LTTE) should not be on the terror list was correct.
Hamas as a political party has been on the terrorism list since 2003, and its military wing since 2001.
LTTE was added to the list in 2006.