Ed Miliband has pledged to make Islamophobia a criminal offence in the UK if he becomes Prime Minister.

In an interview with the Muslim News website, Miliband said a Labour government would make Islamophobia an “aggravated crime”.

“We are going to make sure it is marked on people’s records with the police to make sure they root out Islamophobia as a hate crime,” he said, adding: “We are going to change the law on this so we make it absolutely clear of our abhorrence of hate crime and Islamophobia. It will be the first time that the police will record Islamophobic attacks right across the country.”

The Labour leader also pledged that a future Labour government would recognise a Palestinian State, saying he would have supported recognition at last year’s UN vote.

“We would do everything we can to work for a two state solution which is a viable Palestinian state alongside security for Israel,” he said. He added, however, that he was “not in favour of sanctions” against Israel.

Miliband also went on to criticise the government’s anti-extremist Prevent strategy, accusing it of alienating Muslim communities.

“The reality is that the people I talk to in the Muslim community are absolutely full square with the idea that we’ve got to make sure that we work with our young people to stop them being dragged into this perverted (terrorist) ideology.

“The way to do it is the Prevent programme working with communities. You got to do the things that once this ideology takes hold you try to disrupt it. For me that is the answer. We want to see how the Prevent programme is community focused.”

Last November, the Charity Commission announced it was investigating four charities over alleged links to Islamist fighters in Syria. Al-Fatiha Global, for which murdered British hostage Alan Henning worked, was investigated after one of its leaders was photographed with his arms around two masked men with machine guns.

Referring to the investigations, Miliband said he was “not in favour of demonising anyone (and) that is the wrong thing to do.”

“What I am in favour is the Charity Commission working without fear or favour. We got to build right across the Muslim community. There is absolutely shared purpose and shared desire to deal with a small minority in our country who get tempted to violent extremism. That is what we got to build on and it is about working with them.”

Making his pitch to Muslim voters, he added: “If you look at what I have done as Leader of the Labour Party I have learnt the lesson of Iraq war, I said no to military action in Syria in summer of 2013 when it was controversial. I have moved forward in the position to causes of Palestinian people.

“Our Government will be absolutely committed to equality not just in law but in fact too. We are committed to race equality strategy. That is why we are committed to breaking down barriers of discrimination.”