A British ex-soldier accused of attending training camps run by militia fighting the Islamic State group has had the case against him dropped.
James Matthews, 43, from Dalston, east London, pleaded not guilty to a terror offence for receiving training in Iraq and Syria on or before February 2016.
He had been due to face trial at the Old Bailey later this year.
But prosecutors said there was no longer a realistic prospect of conviction and offered no evidence.
Joel Bennathan QC, defending, said Mr Matthews was "happy" at the decision but was entitled to a "full and proper explanation of what has happened here".
"We have always said the decision to prosecute Mr Matthews for fighting with the YPG [Kurdish militia forces] against Isis was extraordinary and totally unjustified," he said.
"Mr Matthews was always open about what he had done and it is baffling that the CPS (Crown Prosecution Service) took two years to decide to prosecute him, then seven months later they have suddenly realised there is not enough evidence to do so."
It is believed to be the first time terror legislation has been deployed to seek the conviction of someone who was assisting a group, who are also being assisted by the UK government.
Prosecutor Tom Little QC defended the decision to bring the charge and said the review was based on further evidence "specific" to the case.
In a statement Mr Matthews accused the British government of making a politically calculated decision to charge him.
He asked whether relations with Turkey - which deems the YPG to be a terrorist group - was the real reason he was prosecuted and he demanded an explanation.
It is estimated that since 2015 dozens of Britons have fought against IS with the Kurds in Iraq and Syria.