Yesterday a man drove his car into pedestrians on Westminster Bridge, then killed Keith Palmer, a policeman outside Parliament and was shot dead. The Houses of Parliament were shut down, healthcare professionals from St Thomas nearby rushed to tend to the victims and the killer, exemplifying courage and moral intelligence.

Four people were killed, including the attacker, and 40 are injured. We still do not know who the attacker was, but counter terrorism officials do. The police theory is that he was a "lone actor'", inspired by Isis. Arrests have been made. Those are the bare facts folks.

However that has not stopped wild speculations, embarrassing grandstanding, Twitter insanities, media frenzies and bouts of drunken jingoism. Some of this is understandable. The audacious and merciless struck the heart of our beloved, multifarious city. But we all need to learn what not to do when terrorists attack. The last few hours were not our finest.

After Islamicist terrorist incidents, we ordinary Muslims are always reproved for our failures and instructed on our citizenship responsibilities. Fair enough. But powerful and influential people who think they are always right, need to be more aware of the bigger picture and their own shortcomings. So too over-judgemental and chauvinistic non-Muslims. Many of them use the web as their weapon.

For example, yesterday, some jerk who calls himself Lone Star, tweeted a picture of a Muslim woman on Westminster Bridge, talking on the phone and walking past the injured. A white man did the same, but was not picked on. She may have been really scared, or told to move on by the police. None of that mattered. She was somehow guilty of collusion with terrorism. The more this happens, the more alienated Muslims feel. No one surely wants that. Or do they?

I am not diverting blame away from the many who kill and maim in the name of Islam. Our communities, societies, and nations have much that is rotten and diabolical. Terrorists thrive in this rot. Too many Muslims still will not accept the scale and nature of the problem. Some even think this is the way to our salvation.

However white Europeans, Australians and North Americans too often make things worse, feed the terrorism they seek to defeat and rarely reflect on their mistakes.

First, a small but vital point. Since the appalling coordinated bomb attacks on London in 2005, this is only the second terrorist act. The other was the slaying of fusilier Lee Rigby in 2013 by two fanatical Muslims. In this week when Martin McGuinness died, we should remember that IRA violence was much worse than this. Yet this nation proudly kept itself from falling into excessive emoting and was both stoic and judicious. The twenty four hour news cycle has changed that Great Britain forever. We should look back at that history and learn.

That leads me to journalists, many of whom have carried on alarmingly since it all happened. The BBC's Laura Kuenssberg was in Parliament but didn't actually see what happened yet on the news there she was, theatrical, delivering purple prose and high passion. The deservedly respected broadcaster seemed to lose all sense of proportion. Other political reporters and commentators also went over the top. Such loss of control damages our profession and gives terrorists exactly what they crave. It's the way they get to be on telly. So let's calm down and be a little more careful please, fellow hacks.

Government policies to fight extremist seem only to nurture it

Western politicians too need to discuss the impact of their verbal and practical reactions to this serious threat. When they overstate their ability to combat Islamic terrorism, they sound not strong but weak, not self-controlled but discombobulated. And when they sound off about the unmatched greatness of their civilizations, they come across as ignorant and narcissistic. Our PM's patriotic vanity was inappropriate and a little daft. Does she think other nations do not value freedom and democracy?

Imagine how stirring her speech might have been if she had connected what happened with the experiences of Muslims worldwide who are daily subjected to Islamist terrorism? She could have said: "We today feel what Iraqis have felt for too long. We share the fear and insecurity." Has any British politician ever said that? Truly globalised empathy is the only way to beat this evil.

Government policies to fight extremist seem only to nurture it. David Anderson QC, the outgoing independent evaluator of anti-terrorism unit, warned this February that the Prevent anti-radicalisation strategy was toxic and was whipping up mistrust and fear among British Muslims. In 2010, Professor Richard English, author of Terrorism: How to Respond, concluded that rash, injudicious and "extravagant and counterproductive" state responses corroded liberal democracies. I would add they also are an incentive to join terrorist organisations.

More attacks are predicted. So far we have not fallen apart. The centre holds. But may not forever. Yesterday's attack was a wake up call for all politicians, police, intelligence services, media and concerned citizens, including, but not only, Muslims.

Yasmin Alibhai-Brown is a journalist, columnist, broadcaster and author. Follow @y_alibhai