The terrorism case against former Guantánamo inmate Moazzam Begg collapsed after MI5 belatedly gave police and prosecutors a series of documents that detailed the agency’s extensive contacts with him before and after his trips to Syria, the Guardian has learned.

The documents included minutes of meetings that MI5 officers and lawyers held with Begg, at which he discussed his travel plans and explained he was assisting opposition fighters in their war against Bashar al-Assad’s regime.

On seeing the material, Crown prosecutors realised it corroborated Begg’s defence case: he insists he was always perfectly candid with MI5, and says the agency assured him no attempt would be made to hinder him if he wanted to return to Syria.

Begg’s lawyers had disclosed that the meetings had taken place earlier this year during a hearing in open court during which they made an unsuccessful attempt to secure Begg’s release on bail.

On Wednesday prosecutors told an Old Bailey judge they had “recently become aware of relevant material”, and would be offering no evidence against Begg.

The judge formally entered not guilty pleas on all seven of the terrorism charges that Begg was facing, and he was freed from Belmarsh high-security prison in south London a few hours later.

While Begg and his lawyers were not told anything about the contents of the previously secret material that secured his release, it is now clear that police and prosecution lawyers involved with the case are angry that the documents were disclosed to them after Begg had spent several months in prison on remand. A source with knowledge of the affair said they believed the material should have been handed over at the start of the investigation.

The Crown Prosecution Service says that had it possessed the material, Begg would not have been charged. Begg’s assets remain frozen, however, and he has no access to his bank account, as a result of an order issued by the Treasury after he had been charged with terrorism offences.

Similar orders have been imposed on Cage, the London-based pressure group through which Begg campaigned on behalf of terrorism suspects who have been denied legal rights.

Treasury sources indicated on Thursday that the order would not automatically be lifted as a result of his acquittal.

Begg, 46, spent Thursday with his family in Birmingham and consulting with his lawyers. Associates say he is considering whether to bring legal action against MI5. He has suffered from post-traumatic stress disorder as a result of his three-year incarceration without charge in Bagram Prison and Guantánamo after 9/11, during which time he was tortured. His time in Belmarsh is understood to have exacerbated this condition.

After the Syrian civil war broke out in March 2011, Begg made several trips to the country, most recently in December 2012.

While there he investigated reports of US and UK rendition operations and interviewed former prisoners of the Assad regime.

However, he maintains that during this time he had been in close contact with the intelligence services, keeping them abreast of his plans. The contacts began after he alleged in a blog on Cage’s website that during a trip to Syria in July 2012 he had uncovered MI5’s role in intercepting a phone call by a British Libyan dissident who lived in Syria. British spies were alleged to have then informed Assad’s secret police, which led to the man being rendered to Libya.

In a subsequent blog, Begg said a few months after he had made this allegation, he had been approached by an MI5 officer “who said they wanted to talk to me about my views on the situation in Syria”.

“I told them that they must be aware that I was investigating several leads regarding British and American complicity in rendition and torture in Syria. They called back after consulting with their lawyers and said they understood that and would still like to meet. I agreed to speak to them and meet at a hotel in East London. Both MI5 and me had our lawyers present.”

In the meeting Begg said MI5 were concerned about “the possibility of Britons in Syria being radicalised and returning to pose a potential threat to national security. I told them that Britain had nothing to worry about, especially since British foreign policy, at the time, seemed in favour of the rebels.”

Begg then says he was “assured by MI5” that he could return to Syria and continue his work “unhindered”. However a year later the situation in Syria – and the UK’s position – had become more complicated with Islamic fighters eclipsing the secular Free Syrian Army in the battle against Assad.

Begg’s passport was seized when he was stopped at Heathrow last December on returning from a trip to South Africa. “It was assessed my previous visits to Syria had constituted involvement in terrorism,” he wrote. “No explanation other than that was given.” Two months later he was arrested and charged with terrorism offences.

Amandla Thomas-Johnson, spokesperson for Cage, said: “Moazzam has been clear and transparent about his trip to Syria and the events surrounding it and even wrote about his meeting with MI5 months before he was arrested. It’s important we understand why this evidence came to light in the last couple of months. British security services have already played a part in his detention and torture. Has their late disclosure now led to him languishing unnecessarily in jail for months?”