The government should be spying on Muslims even if they are not suspected of committing crimes, in order to hunt down terrorists before they strike, the head of an anti-extremist thinktank has said.

Ed Husain, of the Quilliam Foundation, said it was the morally right thing to do, and that waiting until people had fallen prey to extremism and were drawn into terrorism was too late.

The foundation received £700,000 from the government for its counterterrorism work as part of a strategy called Prevent. That included £400,000 from the Office for Security and Counterterrorism, which finances projects trying to counter extremism on UK campuses and monitoring websites that appear to endorse Islamist violence.

Husain said of Prevent: "It is gathering intelligence on people not committing terrorist offences. If it is to prevent people getting killed and committing terrorism, it is good and it is right."

Prevent was created to increase the security services' knowledge of extremism in Britain, he said. "If those thoughts and beliefs are linked to killing people in a democracy, the state is the only actor in a democracy that can prevent violence.

"It would be morally wrong of a taxpayer-funded programme designed to prevent terrorism if it was not designed to gather intelligence in order to stop that terrorism from happening.

"The alternative is to let the buggers do what they wish, until they appear on the violence radar, which is too late. If you are in the business of counterterrorism, you must want your intelligence services to know what is going on."

The balance between liberty and security is an issue Britain has grappled with since London was bombed by al-Qaida-inspired terrorists on 7 July 2005, resulting in the deaths of 52 people and 750 injuries.

Husain said gathering intelligence outweighed civil liberty concerns that prying into the political and religious beliefs of people was a dangerous move towards a police state: "That's the name of the game. It's not about doing the right thing by Islamists or by liberal do-gooders, it's about creating a society where liberal do-gooders survive freely."

The government has made repeated attempts to get people who are not police or intelligence officers to inform on those they feel are suspicious.

Ministers wanted lecturers and university staff to inform on suspect students, fearing that campuses had become fertile recruiting grounds for extremists.

Their plans were leaked to the Guardian in 2006, creating a backlash that forced the government to back down.

Today's revelations about Prevent comes amid a debate about how to tackle terrorism. After the July 2005 attacks on London, there was little intelligence about threats posed by al-Qaida-inspired terrorists or about British Muslim communities. The MI5 security service had never really believed that an attack by British-born suicide bombers was likely.

The focus turned to hunting down terrorists, but now the debate focuses on whether any Islamist extremism, even behaviour falling well short of advocating violence, must be tackled.

The Conservatives are seriously considering adopting a new policy called Preventing Extremism.

Among those who would be considered extreme under those plans are those who advocate a caliphate, a pan-Islamic state encompassing many countries; those promoting Sharia law; and those who believe in jihad, or armed resistance, anywhere in the world.

This would include armed resistance by Palestinians against the Israeli military and those who fail to condemn the killing of British soldiers in Iraq or Afghanistan.