A Derby court has heard that a man accused of stirring up anti-gay hatred with a series of leaflets had met with police to ask for advice on how to stay within the law.

In preparing the publications, which included homophobic slogans and images of a person in a burning lake and a mannequin hanging by the neck, Ihjaz Ali, 42, met with the police force, the Derby Telegraph reports.

While there was no indication the police saw the anti-gay content, defence lawyer Mukhtar Hussain QC said his client had made it clear he did not mean to break the law with the publications by asking for police advice.

Ali is one of five men currently standing trial charged under new laws against distributing threatening material intended to stir up hatred based on sexual orientation.

In June, the defendant asked PC Steven Gregory if he would check messages on future leaflets ahead of the group’s protest over a gay pride march, the jury heard.

But by his second meeting with Ali, PC Gregory said the police had begun to receive complaints about anti-gay leaflets the group was sending out to private homes.

He added the force was by then taking legal advice.

While Ali admitted being involved with the anti-gay leaflets, PC Gregory said he did not tell the group to stop sending them out to people’s homes at that point.

A gay witness told the court on Tuesday the leaflets he received made him feel “horrified”, fearing attack on his house and his person.

He said: “They made me feel terrorised in my own home. Sometimes I wondered whether I would be getting a burning rag through the letterbox or if I would be attacked in the street.”

In July, a leaflet entitled ‘The Death Penalty?’, which said homosexuality could be erased from society through execution, was then handed out publicly in the city and the five men were charged under the Public Order Act 1986.

The Public Order Act 1986 was amended by the Criminal Justice and Immigration Act 2008 to create the offence of intentionally stirring up hatred on the grounds of sexual orientation, and these are the first-ever attempted prosecution under the offence.

At Derby Crown Court, the men face up to seven years in prison and an unlimited fine if convicted of the new offences.

The trial continues.