Moazzam Begg said he was happy to be released, as Andy Moore reports
Former Guantanamo Bay detainee Moazzam Begg has walked free from Belmarsh prison after seven terrorism-related charges against him were dropped.
The charges - which were connected to the conflict in Syria - were dropped by the Crown Prosecution Service after "new material" emerged.
Leaving prison, Mr Begg said he had "wanted his day in court" and claimed his detention was "unlawful".
Mr Begg, 46, from Birmingham, was arrested with three others in February.
Speaking from outside prison after his release, he said: "Not once but twice in my case this government has been involved either in directly detaining me or indirectly detaining me and on both occasions it's been unlawful."
Mr Begg also said handling of his case "shows a knee jerk reaction", adding: "It shows little has changed since the beginning of the early days in the war on terror. There isn't an appetite, there isn't a desire to try to really understand what's taking place."
By Dominic Casciani, BBC home affairs correspondent
West Midlands assistant chief constable Marcus Beale walked out of the Old Bailey and told journalists that his force accepted that Moazzam Begg was an innocent man.
Be in no doubt, this result is a catastrophic blow to the police and the Crown Prosecution Service and other agencies who had sought to pursue the former Guantanamo Bay detainee.
There are many people in positions of authority who do not like Moazzam Begg - but he has been a tireless campaigner for what he says have been injustices in the "war on terror".
This entire affair has therefore damaged relations between the British security services and some Muslim communities. Moazzam Begg's supporters have said for months that he did nothing wrong when he went to Syria. They will feel vindicated by today's formal acquittal.
Mr Begg's trial was due to start on Monday, following a hearing at which he had pleaded not guilty to all the charges.
But at a pre-trial review on Wednesday morning lasting just five minutes prosecution lawyers told the court that the CPS had decided there was insufficient evidence to continue with the prosecution.
Mr Begg was appearing via video link from Belmarsh. He spoke only to confirm his name and made no reaction when the judge, Mr Justice Wilkie, formally acquitted him of all charges.
He had been charged with attending a terrorist training camp in Syria between 9 October 2012 and 9 April 2013.
He was also accused of possessing documents for a purpose connected to terrorism and terrorist funding.
'Unfair and inappropriate'
In a statement, West Midlands Police said new evidence had come to light which had "a significant impact on key pieces of evidence that underpinned the prosecution's case".
"Police and lawyers from the Crown Prosecution Service reviewed the new material, previously not known to the police investigation, and concluded there was no longer a realistic prospect of gaining a conviction."
Assistant Chief Constable Marcus Beale said: "I understand this is going to raise many questions.
"However, explaining what this newly revealed information is would mean discussing other aspects of the case which would be unfair and inappropriate as they are no longer going to be tested in court."
He added: "From the beginning this case has challenged the relationship between West Midlands Police and some of the communities we serve.
"I would like to reassure them and Mr Begg that at every stage of this investigation my officers acted in the best interests of the public and of justice."
The BBC's June Kelly said that this had been "a controversial case from the start".
"Moazzam Begg is the most high-profile of all the arrests that have taken place in relation to alleged terrorism in Syria," she said. "Since his release from Guantanamo Bay, he's been a vocal commentator, campaigner and activist.
"His supporters say he made no secret of the fact that he had been to Syria."
'Defamed and vilified'
Asim Qureshi, research director of campaign group Cage, where Mr Begg works as an outreach director, said: "This has been a testing time for Moazzam, his family and the Muslim community.
"The criminalisation of virtually any Muslim that has been to Syria has increased in intensity.
"We hope that Moazzam's release is a sign that the government are now willing to adopt a more measured strategy in relation to anti-terrorism policy and avoid the attempt to criminalise all dissent and crush any organisation that stands up for the rule of law and justice."
Mr Begg was held in the US military prison at Guantanamo Bay in Cuba for nearly three years. He had been detained in Pakistan in January 2002 and taken to Bagram internment centre in Afghanistan, where he was held for about a year before being transferred to Guantanamo.
He was not charged with any offence while in US custody.