A top court of the European Union has annulled the bloc's decision to keep the Palestinian Islamist movement Hamas on a list of terrorist groups.
The decision had been based not on an examination of Hamas' actions, but on "factual imputations derived from the press and the internet", judges found.
The court said the move was technical and was not a reassessment of Hamas' classification as a terrorist group.
It said a funding freeze on the group would continue for the time being.
Hamas dominates Gaza and fought a 50-day war with Israel earlier this year. Under its charter, the movement is committed to Israel's destruction.
Responding to the ruling Israeli Prime Minister Benjamin Netanyahu said Hamas was a "murderous terrorist organisation" which should be put back on the list immediately.
Israel, the United States and several other nations have designated Hamas a terrorist organisation due to its long record of attacks and its refusal to renounce violence.
Hamas, which was founded in 1987, won Palestinian parliamentary elections in 2006 and reinforced its power in Gaza the following year after ousting its Fatah rivals.
Its supporters see it as a legitimate resistance movement against Israel, with whom it has fought for years.
In December 2001, the Council of the European Union - representing the governments of member states - adopted a "common position" and a regulation to combat terrorism.
It established a list of designated entities and people whose funds would be frozen. Hamas' military wing, the Izz al-Din Qassam Brigades, was named on the initial list, and its political wing was added two years later.
Hamas contested the decision and on Wednesday the EU's General Court found it had been "based not on acts examined and confirmed in decisions of competent authorities but on factual imputations derived from the press and the internet".
The court said it was therefore annulling Hamas' designation but would temporarily keep existing measures against the group "in order to ensure the effectiveness of any possible future freezing of funds".
This would be maintained for three months, or, if an appeal is brought before the European Court of Justice, until it was closed, it added.
"The court stresses that those annulments, on fundamental procedural grounds, do not imply any substantive assessment of the question of the classification of Hamas as a terrorist group within the meaning of the common position."
Hamas deputy political leader Moussa Abu Marzouk said the decision was "a correction of a historical mistake".
"Hamas is a resistance movement and it has a natural right according to all international laws and standards to resist the occupation," he told the Reuters news agency.
But European Commission spokeswoman Maja Kocijancic said the EU continued to "consider Hamas a terrorist organisation" and would consider its response to the ruling.
The Israeli economy minister called the court's decision immoral.
"Israel is strong and can defend itself against its enemies, but those who will suffer from strengthening terrorist groups will be the Europeans themselves," Naftali Bennett warned.
Hours after the ruling, the European Parliament adopted a compromise resolution supporting "in principle recognition of Palestinian statehood and the two-state solution", and calling for peace talks between Israel and the Palestinians to be "advanced".
The original text had called for unconditional recognition, in line with resolutions passed by several national legislatures in recent months.