The home secretary, Priti Patel, has apologised to a Muslim man after the government falsely described him as an extremist hate preacher.

Dr Salman Butt, the chief editor of the Islam21c website, was named in a 2015 press release entitled: PM’s Extremism Taskforce: tackling extremism in universities and colleges top of the agenda, as someone who legitimises terrorism. When he took legal action against the government, it initially attempted to defend the libel claim by using a defence of “honest opinion”. But it has now agreed to delete his name from the press release and pay him compensation and his legal costs.

In a statement read in open court on Monday, Aidan Eardley, legal counsel for the home secretary, said: “The government accepts that it was wholly false to allege that Dr Butt is an extremist hate preacher who legitimises terrorism and therefore someone from whose influence students should be protected.

“It is sorry for the harm caused to him and in particular for the fact that the allegation was made and maintained for so long.”

The press release marked the introduction of “specific policies to stop extremists radicalising students on campuses”. Before it was published, Butt had had no contact with the police, the security services or any other government agency about his political and religious views, he said.

Responding to the settlement, Butt said: “One of the clearest lessons of this case in particular is just how baseless the notion of ‘extremism’ – and therefore ‘counter-extremism’ – actually is.”

“I believe the discourse of extremism is dead. More and more people are realising that it is a nebulous term used by the powerful to silence any thoughts, ideas or speech they do not like or cannot challenge without coercion. It is the ‘heresy’ of today.”

Following the legal action, the names of universities and other named Muslim public speakers have also been removed from the press release.

Butt’s solicitor, Tamsin Allen of Bindman’s LLP, said: “The most shocking thing about this claim is that the home secretary defended it over five years, even though it was accepted that the very serious allegations were not true. It was only after documents revealed that it was a mistake to include Dr Butt’s name in the publication that she was forced to conclude the proceedings and pay a very substantial sum in compensation to Dr Butt. We are delighted that Dr Butt’s reputation has now been entirely vindicated.”

A challenge by Butt to the government’s monitoring and collation of his online activities by the Home Office’s Extremism Analysis Unit, pursuant to the Prevent duty, is pending before the European court of human rights. The duty, in the controversial Prevent deradicalisation scheme, requires specified authorities, in the exercise of their functions, to have due regard to the need to prevent people from being drawn into terrorism.

Muhammad Rabbani, the director of the advocacy organisation Cage, said the case should sound the death knell for the Prevent programme, which has been dogged by claims of being a cover to spy on Muslim communities. Muslims were Prevent’s main focus when it was created, although its also covers rightwing extremism and those with an uncertain or unclear ideology.

Rabbani said the case “has the potential to undermine the Shawcross review of Prevent, which is due imminently. The apology unravels not only the entire politicised basis of ‘extremism’ labels but critically cripples the failing Prevent strategy which is dependent on that rationale.”