A student who was arrested and held for seven days after downloading the al-Qaida training manual as part of his university research into terrorist tactics has received £20,000 in compensation and an apology from the police for being stopped and searched.

Rizwaan Sabir, 26, was studying for a master's at the University of Nottingham in 2008 when he was detained under the Terrorism Act and accused of downloading the material for illegal use. He was arrested on 14 May after the document was found on an administrator's computer by a member of staff.

Sabir had asked the administrator, Hisham Yezza, to print out the 140-page manual as they were collaborating on research.

As soon as he was made aware of the situation, one of Sabir's supervisors confirmed that the manual – which he had downloaded from a US government website and which can be bought at WH Smith – was relevant to his research.

After seven days and six nights in custody, he was released without charge or apology. But his lawyers later discovered Nottinghamshire police were holding an intelligence file on him, which contained false information about him and wrongly claimed he had been convicted of a terrorist offence.

His legal team brought proceedings against Nottinghamshire police for false imprisonment and breaches of the Race Relations Act 1976 and the Human Rights Act 1998. The proceedings also included a claim under the Data Protection Act 1998 relating to the intelligence file.

The case was due to go to trial on Monday 19 September, but the force settled last week, paying Sabir £20,000 compensation and covering his legal fees. It apologised to Sabir for a stop and search on 4 February 2010 and agreed to delete the inaccurate intelligence information.

Sabir, now a PhD student at the University of Strathclyde researching domestic UK counter-terrorism policy, told the Guardian he was delighted at the settlement.

"This is finally some vindication and we can say proudly that I have proved to many, many people who may have suspected that I was a terrorist that I am actually innocent and always have been," he said. "It shows and it proves that [the police] were wrong to have behaved the way they did. They were wrong to put me through the torturous experience they did and they have finally accepted that."

He said his experiences had given him an insight into his field: "I was very, very lucky in the sense that I was released without charge because I was innocent in the first place. It has allowed me to understand the perspective from the other side. It has made my understanding a lot more in depth. You understand how policing works, you understand how counter-terrorism operations work, how the police behave, how they think, and the public pressure that they are under."

His solicitor, Michael Oswald of Bhatt Murphy, said the case showed how the so-called "war on terror" had perverted the rule of law over recent years.

"Clearly, the police have a difficult and important job to do in their counter-terrorism role, however, they must nonetheless act within the law and must be held to account when they do not," he said. "Through his remarkable effort and fierce determination over the last three years, Mr Sabir has been able to do that in this case. This result is nothing more than the clear vindication that he is entitled to."

However, a spokesman for Nottinghamshire police said it stood by the original arrest and detention, saying they were "perfectly legal, proportionate and necessary" under the circumstances.

He added: "The matter was settled without admission of liability save that the force admitted that one brief search of Mr Sabir and his vehicle carried out in February 2010 was the result of a mistaken belief on the part of the officers involved. This was admitted in November 2010 and the force apologises for this search."

Given the financial risks of litigation, said the spokesman, "this modest monetary settlement was viewed as a sensible way of keeping overall costs to a minimum".

The University of Nottingham released a short statement, saying: "This is a matter between the police and Rizwaan Sabir, who has not been a student at the University since he completed his studies here in September 2009."

• This article was amended on 16 September 2011. The original said the Unversity of Nottingham had attempted to contact Hisham Yezza after the document was found on his computer but failed. It now accepts that this was not the case.