Since July 1, public bodies across the UK have been under a legal obligation to implement a government programme, known as Prevent, said to be aimed at stopping people turning to terrorism. The programme has been running since 2007, but hasn't had statutory backing until this year.

It has always been controversial. A report published by the Institute of Race Relations in 2009 claimed that a "significant part" of the programme involved intelligence-gathering amongst Muslim communities. Scotland Against Criminalising Communities said in the same year: "Prevent is an attempt to recruit civil society into a kind of open conspiracy against Muslims." A group of academics – including Professor David Miller of the University of Bath and Professor Bill Bowring of Birkbeck College – said this year that "Prevent has failed not only as a strategy but also the very communities it seeks to protect." The National Union of Students is opposed to Prevent and has instructed NUS officials not to engage with it. The University and College Union has this year instructed its National Executive Committee to organise a boycott of Prevent.

Local authorities, schools and the NHS are obliged to implement Prevent as a result of statutory guidance issued under the Counter Terrorism and Security Act 2015. The obligation will be extended to universities and colleges once Parliament approves further guidance placed before it just last month.

The new legal requirements are arguably just a formality in England and Wales, where Prevent has already been rolled out forcefully. But Prevent has so far been rather low-key in Scotland. That may be set to change.

A 15 year-old boy attending a school in England was recently referred to police under the Prevent programme after he came to school with leaflets promoting a boycott of Israel. The police officer said that the boy's views on sanctions against Israel were "terrorist-like beliefs". The leaflets had been produced by a Muslim-oriented group, Friends of al-Aqsa, that seeks to defend the human rights of Palestinians. It emphasises international human rights law and seeks co-operation with international heritage, cultural and humanitarian organisations.

Primary school children, and even a child of three, have been referred to police through Prevent and placed in the de-radicalisation programme dubbed Channel. Care orders have been filed in cases involving young children from Muslim families identified through Prevent as being at risk of "radicalisation".

It is hard to guess whether all these sinister absurdities will be brought to Scotland. But the statutory machinery now driving Prevent in Scotland is identical in all relevant respects to the machinery driving it in England. Scottish schools will have to do something to meet their legal responsibilities. If not this, then what?

Counter-terrorism policy is a Westminster matter, but Prevent has a wider reach than that. According to the Scottish Government "most of the authorities which deliver Prevent activities in Scotland mainly deliver devolved functions."

The Scottish Government says: "In developing the Scottish Prevent Guidance, the Scottish Government has worked with the range of statutory authorities listed, to ensure the guidance is balanced, appropriate and reflects the Scottish context."

But no Scottish MP participated in the debate on the Scottish Prevent Guidance in the House of Commons on March 24. And there has been no debate in the Scottish Parliament.

The Prevent Duty Guidance for Scotland, like the guidance for England and Wales, says: "Islamist extremists regard Western intervention in Muslim-majority countries as a ‘war with Islam’, creating a narrative of ‘them’ and ‘us’."

Whether Western intervention in these countries is primarily a war for resources and strategic location, or on the other hand amounts to a war with Islam, is a matter for debate. A range of views may reasonably be held. To pin the "extremist" label on one of these views – one that many Muslims are likely to feel reflects their own experiences - is naked Islamophobia. It means that attempts to build Muslim-oriented or Muslim-led anti-war activity in universities or in spaces controlled by local authorities are likely to be blocked or met with suspicion. And it means that Muslims visibly involved in anti-war activity may be met with suspicion when they visit the doctor, or when their kids go to school.

In an open letter supported by Lindsey German, Convenor of the UK Stop the War Coalition, Keir McKechnie, Chair of the Stop The War Coalition Scotland, Professor Alex Law of Abertay University, lawyer Aamer Anwar and others, the Scottish Government was asked to use its consultative role under the Counter Terrorism and Security Act 2015 to remedy the Islamophobia expressed in a single key paragraph of the guidance. It has not done so and appears not to understand the problem. It simply says: "The duty does not bring any obligations to suppress anti-war campaigning."

Prevent will undermine open debate, free speech and political dissent. It will poison community relations. It's time that our MPs and MSPs paid it some attention.

Richard Haley is Chair of Scotland Against Criminalising Communities