Former Guantanamo Bay detainee Moazzam Begg accused the Government of "demonising the Muslim community" as he walked free from jail after terror charges linked to the civil war in Syria were dramatically dropped.

The 46-year-old launched an attack on British home and foreign policies as he left high-security Belmarsh prison in south east London after seven months in custody.

Mr Begg had denied seven counts - one of attending a terrorist training camp in Syria between 2012 and 2013, five of possessing terrorist documents and one of funding terrorism by making a generator available.

But just days before his trial was due to begin at the Old Bailey, he was formally acquitted of all charges by Mr Justice Wilkie in light of "new material".

On leaving jail, he told reporters: "I wanted my day in court but I was very happy."

He went on: "I need to reconnect with my family again. I need to understand what it's like to be a free man and I think that it's important to point out some of the Government's failures in its foreign policy and its internal policy - its clear demonising of the Muslim community.

"And not once but twice in my case this Government has been involved either in directly detaining me or indirectly detaining me.

"I think it shows that we have a knee-jerk reaction. It shows that little has changed since the beginning of the early days of the war on terror and there is not an appetite, there isn't a desire, to try to really understand what's taking place and the more this continues the more it's going to alienate people."

Mr Begg, of Boden Road, Hall Green, Birmingham, was speaking as Prime Minister David Cameron told the Conservative Party conference that Britons who fight for Islamic State have picked a side and are enemies of the British state.

And yesterday, Home Secretary Theresa May announced tough new policies to tackle those "who stay just within the law but still spread poisonous hatred".

At a hearing in May, Brian Altman QC had outlined the case against Mr Begg as he opposed bail.

He told the court that material had been found on Mr Begg's iPhone showing that he had been involved with training programmes in Syria over six months, during which time he had assumed a role of "power and authority".

A transcript of Mr Begg's conversations had been produced as a result of a "covert probe" in which he complained of new arrivals' apparent lack of maturity and experience.

Mr Begg is heard to say: "Jihad is not just a physical capacity but also about using your brain."

On the need for training, Mr Begg also says: "They want to call it martyrdom but I said we have to be physically prepared. If you don't prepare this just becomes suicide, not martyrdom.

"In my opinion a person going over to fight for the rights of Muslims - I do not see what the problem is."

Mr Altman asserted: "Jihad is not about self-defence of an otherwise defenceless population."

But Ben Emmerson QC, defending, had told the court that his client's stance on Syria was not at odds with the British Government's own position.

He said: "Mr Begg did not train anyone for the purposes of terrorism as defined in the 2001 Act. Mr Begg says he was involved in training young men to defend civilians against war crimes by the Assad regime."

Following his acquittal, Asim Qureshi, research director of campaign group Cage, where Mr Begg works as an outreach director, said: "The criminalisation of virtually any Muslim that has been to Syria has only increased in intensity, while Cage has been attacked from every angle by a host of government agencies.

"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 like Cage that stands up for the rule of law and justice.

"Cage and Moazzam have been maligned, defamed and vilified by far too many and we hope that now our calls for the protection of basic rights, and innovative approaches built on dialogue to dispute resolution, will now be heeded."

Islamic Human Rights Commission chairman Massoud Shadjareh said: "As was widely suspected, there seems to have been no basis for his arrest and it does seem that, as a high-profile member of the Muslim community, Mr Begg was being made an example of in order to silence activists campaigning against draconian anti-terrorism laws.

"His persecution is especially disturbing in the context of yesterday's Conservative election manifesto pledge by the Home Secretary, Theresa May, to impose new curbs on organisations and individuals who are considered to hold 'extreme' or 'non-British' values.

"Under these proposed laws the likes of Mr Begg and others who outspokenly criticise Western foreign policy would be criminalised for merely their beliefs and opinions."

Mr Begg's lawyer, Gareth Peirce, said: "Moazzam Begg is a good and brave man.

"He has spent the near-decade since he was released from the torture of Bagram and Guantanamo in attempting to wake the world up to injustice and to comprehend its causes and effects."

And Mr Begg's brother, Mirza, said: "We are just so happy to have Moazzam home with us in time for Eid.

"It is confusing why the British Government would incarcerate him for such a long period if it didn't have sufficient evidence. But right now, we are just relieved that this seven-month ordeal can come to an end and Moazzam can be back with his family."

Meanwhile, West Midlands Police Assistant Chief Constable Marcus Beale defended the investigation, saying it had been carried out in a "diligent and professional manner".

He said: "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.

"This case has been investigated in a diligent and professional manner. Today's events demonstrate that the police and CPS continually assess the evidence in terrorism prosecutions and will alter course if that is the right and proper thing to do."

A CPS spokesman said: "If we had been made aware of all of this information at the time of charging, we would not have charged."ervice.