THE barbaric attack on the office of satirical magazine Charlie Hebdo reached a dramatic and bloody conclusion yesterday. The hunt for those suspected of killing 12 people in cold blood and wounding 11 more ended in two fearful sieges.

Brothers Cherif and Said Kouachi, on the run for two days, were cornered in a warehouse north of Paris and were shot as they tried to flee.

A third man, thought to be linked to the terrorists died when police stormed a supermarket where he had taken a number of hostages.

One hostage was freed in the first siege. Four more died at the supermarket before others could be led to freedom.

After the shock, after the fear and drama of the search for the murderers, after the outpouring of solidarity with the people of France and the journalists, cartoonists and police officers who were killed and injured come the questions.

How do we respond? How do we prevent a repeat? How do we in the West build societies where young Muslims are not tempted to hear the call of a twisted version of their faith?

Much of the debate in the immediate aftermath of Wednesday's shootings focused on freedom of speech. Headlines around the world proclaimed the attack a war on free speech and an assault of democracy. "Je suis Charlie," has become the cry of millions who are determined not to be cowed.

It's right we face down the threat of further atrocities. That does not mean asserting our right to free speech by provocatively re-producing cartoons or columns simply in order to cause offence. It means carrying on as normal, making the same decisions as before about what we say or write or draw. Freedom of speech is too powerful to play with. Let the same tricky balancing acts continue.

But the attacks were about more than freedom of speech. Taking revenge for depicting the Prophet Mohammed appeared to be the motive but the real purpose of radical Islam's anti-Western jihad is to foment anger, stir hatred and create a backlash. The terrorists aim to provoke. They crave division and distrust. If we declare war on terror we lose because we feed anti-Western sentiment around the globe. We become the jihadists' recruiting sergeant.

The threat will remain. It is impossible to reason with those already so radicalised they wish to become martyrs. But gradually, over time, the tide of hatred can be made to recede. Across the liberal, democratic West, Muslim community leaders have an important role to play. It is through their actions, not the efforts of battalions of troops hunkered in compounds in Iraq or Afghanistan of Pakistan, that peace will prevail. Messages of tolerance and co-operation should go out. Atrocities must be condemned.

We know this works because it's what already happens within our old-established and well-integrated Muslim communities. Scotland's Muslims have long lived together as friends, neighbours and colleagues with those from other faiths and none.

The horrific events in Paris show the need for all our different communities to pull together and preach a common creed of mutual respect. Suspicion and antagonism are what the terrorists seek. Avoid that and we have not given in to them.

If "Je suis Charlie," is our defiant declaration today, "nous sommes tous amis" must be our message for the future.