The EU may have to remove Palestinian Islamist group Hamas and the Sri Lankan separatist Tamil Tigers from its list of terrorist organisations, a top European Court adviser has said.
The Court ruled in 2014 they should be taken off the list on technical grounds, not as a reassessment of their classification as a terrorist group.
The Council of the EU, which represents all 28 governments, launched an appeal.
Now the European Court adviser has recommended the appeal be rejected.
The opinion of the adviser, known as the Advocate General, is not final but is generally followed when the European Court of Justice (ECJ) delivers its judgement.
The EU's terrorist list was drawn up after the 11 September attacks on the US in 2001, to enable the bloc to freeze a group's financial assets and improve the way police and justice officials co-operated.
Among the 23 groups and individuals listed are the Kurdish militant PKK, the military wing of Lebanon's Hezbollah and Palestinian militant groups such as Islamic Jihad.
Any final decision to remove Hamas and the Tamil Tigers is not thought likely to affect lists drawn up by national governments.
An EU official told the BBC that the terror list had been made on the basis of national decisions, and the underlying national legislation had not been called into question.
But if the two groups are removed from the list it will be a significant decision for both groups and their ability to raise funding.
Hamas has always argued it is a resistance movement rather than a terrorist organisation, although under its charter it is committed to Israel's destruction. It is seen as a terrorist group by the EU, US, Canada and Japan.
After winning parliamentary elections in 2006, Hamas ousted its Fatah rivals from Gaza the following year and has since fought three conflicts with Israel.
The Tamil Tigers were defeated by the Sri Lankan army in 2009 and no longer exist as a military force.
The ECJ's Advocate General said that the Council of the EU had made procedural errors in defining the two groups as terrorists.
She found that the Council incorrectly relied on judgements made by governments without checking that they had the same human rights as the EU. Also, she said it should not have relied on evidence found in the press or on the internet.