The fight to win legal equality for gay people is almost won in Britain – yet the taste of champagne has been tainted by an unexpected dash of blood. In the past few years, gay people have finally begun to exercise the same rights as their straight siblings, yet there has been a sharp surge in violence against us.

In London, recorded homophobic attacks are up by 20 per cent. In Glasgow it's 32 per cent; in Liverpool it's 40 per cent; in Greater Manchester it's 63 per cent. James Parks is only the latest face to be kicked in by this trend: last week, the off-duty police officer left a club in Liverpool with his boyfriend and was lynched by a group of 20 teenagers who smashed his skull and left him close to death.

In a recession, violence always rises, and violence against minorities rises more. Attacks on Muslims, Jews, and black people are also spiking across Britain. But recorded violence against gay people has shown the most extreme rise. Last year, an 18 year-old hairdresser in Liverpool called Michael Causer was sleeping on a friend's sofa after a party when he was woken up. A witness testified that a group of teenagers yelled, "You little queer faggot!" They said they were going to cut out his body-piercings with a knife, and started burning his legs with a lighter. He was found bleeding to death later, dumped in the road outside, after having his head smashed in with a hardback book.

Download the new Independent Premium app Sharing the full story, not just the headlines

At the trial, one of the 19-year-olds tried for the murder said he was acting "in self-defence" – against a smaller, seven-and-a-half stone boy with no history of violent behaviour. A witness said that during the attack, he had yelled: "He's a little queer, he deserves it!" Yet the jury found him not guilty.

What can we do to stop this surge? The answer does not lie in new laws; these attacks are already highly illegal. It lies in changing the culture of two core British institutions that are still tolerating anti-gay bigotry – our schools, and our police service.

Almost all the new homophobic attacks have been carried out by teenagers who are in – or just out of – the education system. It is not a coincidence that our schools are the one place where homophobic violence is still absolutely mainstream. Ofsted says that homophobia is "endemic" in our playgrounds and our classrooms. A study by Stonewall found 41 per cent of gay children are beaten up, and 17 per cent have been told they're going to be killed (it's 10 per cent higher still in faith schools). The young people who attacked PC James Parks were simply taking that culture out of the playground and onto the streets.

This doesn't have to happen. Michael Causer's mother, Marie, says: "This generation of infants needs to be educated. You hear youngsters as young as four and five saying 'Go away, you're gay.' It might be a word to them, but their parents need to pull them up and tell them that it's wrong. They need better education to let them know that gay people are no different."

When this is tried, it works. The Stonewall study found that in schools with a consistent policy of punishing homophobic language, gay children were 60 per cent less likely to be attacked. That fall in violence could ripple out from the school gates - but today, only 6 per cent of schools adopt this policy. The Government should immediately make it mandatory.

What about the police? There are some terrific police officers who are appalled by anti-gay crime – I'm related to one – but they remain too few. A major 2005 study for the Home Office found that homophobia and sexism are "all but endemic within the police service". It was "not just in every force we surveyed, but in every part of every force". One of the authors, Professor Tim Newburn of the London School of Economics, said: "It is quite clear that gay and lesbian officers find themselves in a very uncomfortable position in the police service ... Sexist and homophobic language is now largely ignored and even tacitly accepted."

Little seems to have changed since the report. This week, a lesbian police officer called Sergeant Jasmine Stewart is appearing before a tribunal. She says her colleagues called her "a poof" and refused to work shifts alongside her. She gave evidence that a senior officer had said she had caused a "drop in morale" in the station.

If the police are happy to talk about "faggots" when the door is shut, what do they do when one of them walks through the door needing help? In too many cases, they do too little. To pluck one example: in Brighton a few weeks ago, two gay women – aged 18 and 22 – were repeatedly punched in the face by a gang of thugs. They went straight to the police – but it was 12 days before officers appealed for witnesses, long after the trail had gone cold.

Yet the 2005 report contained some good news. Racist language had "all but disappeared" from the police force. Why? "Because officers know it will lead to disciplinary action." Of course some racist attitudes remain, but they have been driven underground by a tough policy of requiring police officers to talk about black and Asian people respectfully. It means there are fewer cases like the Steven Lawrence abomination, and so fewer murderers walking our streets. The same could be done with gay people. All it takes is political will.

Of course, any move to ensure gay people are treated the same as everyone else is immediately labelled "political correctness" and smothered in exaggeration and distortion. The defenders of homophobia can no longer, in polite society, say they think gay people are disgusting and immoral. Too many people have grasped the simple, humane truth that every human society in history has had 3 to 5 per cent of people who were attracted to their own gender, and it does no harm to anyone. So the homophobes have resorted to other tactics. One that has been growing over the past year is to claim that gay people who are trying to stop bullying and intimidation are "the real bullies", trying to "silence" poor embattled homophobes.

The logic of this argument is rarely spelled out. Were Martin Luther King and the Grand Dragon of the Ku Klux Klan equally bigoted? The Grand Dragon was intolerant of black people; King was intolerant of racism. When you put it put like this, the bogus nature of this way of framing the debate becomes clear. To one side, there are people who believe an entire group of human beings is inferior and deserve lesser rights, simply because of a naturally occurring and harmless difference. To the other side, there is a group of straight and gay people who say sexual orientation is a trivial subject and we should all be treated the same. Yes, both sides should have the right to speak freely – but nobody should pretend there is a moral equivalence.

There are even people who hint that this violent backlash against equality is evidence that gay people should have stayed in the closet. With faux compassion, they say – well, this is what happens if you "flaunt" your sexuality by behaving like everybody else. Do they realise what they're saying? The great civil rights advances in the 1960s in the US were followed by a sharp rise in anti-black violence. Should black people have stayed out of the polling booths and at the back of the bus to avoid the wrath of racists? The problem is not with the victims; it's with the thugs attacking them.

We have come so far in this country thanks to the decency and compassion of most British people – but we have only reached the half-way point. The battle to change our laws was a crucial stage. Now we need to change our institutions. The people who oppose these humane measures hissing "PC! PC!" – or "it's my religion!" – should know what they are doing. They are ensuring more innocent people like James Parks and Michael Causer – or your son, or sister, or neighbour – will be lynched, simply because they were born gay.

You can see Johann Hari debating against Anne Atkins the issue of homophobic violence by clicking here

You can read Johann's latest article for Slate by clicking here

You can follow Johann on Twitter at www.twitter.com/johannhari101

j.hari@independent.co.uk