So, Scotland is finally in the front line of international terrorism. It is almost 20 years since the last terrorist incident in Scotland - at Lockerbie in 1988 - and that atrocity was not specifically directed at this country: Pan Am 103 simply fell to earth. The car which shattered the glass in Glasgow Airport on Saturday also shattered any complacent illusions that Scotland had some sort of immunity from terrorist attack.

This was Baghdad in Abbotsinch - a gas cylinder car bomb of the kind common in the Iraqi capital, and which has produced obscene carnage there. That it failed to do so here is down to a combination of chance and security. We may not be so lucky next time.

For Gordon Brown, newly installed in No 10, it means the terrorists have opened a new front in his own Scottish backyard.

Sensibly, Mr Brown moved swiftly to involve the SNP leader, Alex Salmond, in the anti-terror Cobra committee to prevent any sense of grievance emerging north of the border about the government being more concerned with London lives than Scottish ones.

But Scotland has been left with a sense of "why us?" We're different, aren't we? We're not really a part of the Anglo-American military axis. A small nation, subordinated to a larger partner in the UK, too marginal to bomb. The IRA never took its war here because many Republicans believed Scotland to be a Celtic country also under the English yoke and therefore not responsible for British military actions in the province (a curious attitude bearing in mind the brutality of Scottish soldiers in the Black and Tans during the Irish civil war).

Similarly, Black September-style Palestinian terrorists in the seventies and eighties didn't have a casus belli against Scotland, and Scottish politicians such as George Galloway were considered friends of the PLO. And the new Islamist militants of al Qaeda were thought to be focused on English targets, specifically London, which they regard as one of the nodes of the pan-Christian crusade against Islam.

Terrorists tend to target the centres of government and the media because that's where they get the maximum bang for their buck. That's where newspaper editors live and where their children go to school. It's where government ministers take the decisions on war and peace and where the centres of finance are located. Moreover, the Muslim community is larger in English cities. London has one million Muslim citizens; Scotland has 60,000 - and they are well integrated.

But times change. Glasgow appears to have been an al Qaeda attack by home-grown Islamist fanatics, part of a co-ordinated attack on the UK. There is evidence that the car bombs that failed to detonate in London's club-land were stolen in Scotland.

This doesn't mean the terrorists were Scottish, but it does suggest that the Islamist network is now well-established here, and that is going to change the way we live in all sorts of petty ways. Just don't think of driving to the airport any more. It appears that the bombers here are relatively new to the game. They made elementary miscalculations in the timing and location of their devices, and about the robustness of airport security measures. Nor were they suicide bombers - though one of the Glasgow bombers appears to have been behaving as if he were prepared to die with his bomb.

Concerned for the future of race relations, Mr Salmond has urged Scots to avoid blaming Scotland's Muslims. "Individuals are responsible for their actions, not communities. No community in Scotland should feel threatened or under suspicion." For his part, Mohammad Sarwar, Scotland's first Muslim MP, condemned the attack, pointing out that many Muslims use Glasgow Airport and that Scots had marched and protested against the war in Iraq.

Indeed they have, and many MSPs - of all parties - have made clear their opposition to the war. However, the facts that winna ding are that the Prime Minister, Gordon Brown, is Scottish and now in charge of the war, and the Defence Minister, Des Browne, is also Scottish. Black Watch, the play performed at the royal opening of parliament on Saturday, was all about the trials of Scottish soldiers serving in Iraq. We Scots may have convinced ourselves that the war was "not in our name", but Islamist groups clearly see our fingerprints all over it.

Of course, this is no justification for terrorism, for trying to take the lives of innocent civilians; many of them, as it happened, Muslims on their way to Lahore in Pakistan. The young men who cried "Allah" as they tried to turn Glasgow Airport into charnel house were deluded and misguided, and acting contrary to their own religious beliefs. Nevertheless, the Islamic grievance over the deaths of hundreds of thousand of Iraqi civilians in an illegal war that we started is a real one.

Intelligence experts are agreed that western foreign policy has contributed greatly to the rise in terrorism. The respected International Institute for Strategic Studies concluded in 2004 that the occupation of Iraq had become a "potential global recruitment pretext for jihadists".

Now, Mr Salmond has wisely avoided making any political commentary on the Glasgow bombing, instead congratulating the emergency services and condemning terrorists. He has not tried to argue that the Islamists should exempt Scotland. Nor has he condemned Mr Brown for voting in cabinet for the invasion, or complained that Scotland has been endangered by a foreign war we never wanted. But you can be pretty sure that is what he is thinking.

And so are others in Scotland. The war has never been popular her. A TNS System Three poll in 2004 found 63% of Scots favoured troop withdrawal from Iraq. Nor has the Scottish press been supportive of the invasion. Mr Brown realises this, of course, and will insist, if challenged, that this enemy is targeting the UK as a whole, not Scotland alone. We are in this together.

However, the new PM shows every sign of wishing to be out of Iraq as soon as possible. His new Foreign Secretary, David Miliband, is known to be sceptical about Iraq and he has enlisted to his cabinet figures such as John Denham, who resigned over the invasion. The word is that Mr Brown wants British withdrawal to be well under way by next spring, though that may be too late to prevent further bombings in Britain.

This has been a devastating start to Mr Brown's administration, a real baptism of fire. He has discovered that the Islamists loathe him just as much as his predecessor - and, worse, they seem determined to hurt him in his homeland. He has been lucky so far that the bombs have been dud, and no-one has been killed. But his luck can't last indefinitely, and then we will see what he is really made of.