A court in the Dutch city of Rotterdam has acquitted 12 men accused by prosecutors of recruiting volunteers for a holy war against the West.
Al-Qaeda is blamed for the 11 September 2001 attacks in the US
Two of the men were convicted for possession of false documents and were sentenced to two and four months in prison.
However they too were freed on the grounds that they had already spent months in custody.
Prosecutors had already ceased to press a charge of helping the enemy in time of conflict against all but two of them, downgrading it to "membership of a criminal organisation".
And the court had released four of the men
Two men were convicted on Thursday for possession of false documents, and were sentenced to two and four months in prison.
The trial, which began last month, was being seen as a test of the Dutch justice system's ability to deal with suspected terrorists.
Of course this is a disappointing verdict for us
Prosecutor Bart Nieuwenhuis
The 12 men, who come from nine countries, including Libya, Egypt, Iraq and Morocco, were arrested last year.
They were accused of recruiting volunteers for organisations such as the Afghan Taleban and Osama Bin Laden's al-Qaeda network, and funding their operations by selling drugs.
Experts disagreed whether the charge of helping the enemy in a time of conflict - not used since the aftermath of World War II - was applicable in the aftermath of the 11 September attacks.
Prosecutors said the Netherlands was involved in armed conflict because its soldiers were taking part in Operation Enduring Freedom in Afghanistan.
However, the court dismissed the charge, on the grounds that the troops sent to Afghanistan were peacekeepers, combat troops.
This is the second setback of its kind for Dutch prosecutors in the last six months.
They lost their first major terrorism case in December, when a court acquitted four suspects accused of plotting to attack the United States embassy in Paris .
Judges refused to accept evidence from the Dutch security service, the AIVD, because it refused to release classified information in court.
"Of course this is a disappointing verdict for us," said prosecution spokesman Bart Nieuwenhuis on Thursday.
A public prosecutor said his office would appeal against the verdict.