There was panic in Nato capitals last week caused by an irrational fear that a Nato country had been attacked by Russia triggering article 5 of the Nato treaty. Two Russian missiles fell on Poland near the border with Ukraine killing two unfortunate Polish citizens.

It was a tragic incident for those who died and their families, but in the grand scheme of things this was a minor incursion that could not remotely engage article 5 even if the missiles were fired from Russia. But we live in dangerous times and people, including experienced journalists and arm chair strategists, talked up the possibility that article 5 was capable of being engaged.

In the event it turns out that although the missiles were Russian S-300 surface to air missiles, they were fired by Ukrainians in defence of their country.

US president, Joe Biden, who was attending a G20 meeting in Bali in Indonesia, was woken in the early hours last Wednesday for an intelligence briefing on the incursion and immediately scotched rumours this was a Russian attack. It was he said probably wayward Ukrainian air defence missiles that fell on Polish territory by accident.

This was then confirmed by the Polish government and Nato’s secretary general, Jens Stoltenberg, who explained why Ukraine was not to blame. The missiles that fell on Poland, he said, were fired by Ukraine in self-defence, which would not have happened but for the Russian invasion of Ukraine – which is a fair point except, of course, for those who died. Nato has not suggested there is evidence that Ukraine fired missiles deliberately into Poland in a false flag operation to provoke Nato into action against Russia.

President Volodymyr Zelenskiy of Ukraine insisted the missiles were fired by Russia but then he would say that wouldn’t he? He sounds as if he wants a neighbouring Nato country to be attacked by Russia but American intelligence trumps the information he can access.

Nato may be anti-Russian and may have been called brain-dead by President Macron of France, but the Americans, who dominate the alliance, are not going to go to war with Russia over a couple of stray missiles even if they were fired by Russia. Indeed their security chiefs met with their Russian counterparts in Ankara recently for talks, precisely in order to ensure that they and Nato are not railroaded into a war by accident or mistake.

The rationale behind the Nato alliance was to repulse major military attacks that require a military response to be contained, not minor random incursions. The alliance was aligned with the purposes and principles of the UN Charter that launched a new world order after World War II that is dead against the use of force. Nato was set up to defend liberal democracies in the North Atlantic area from serious attack in line with the common self-defence provisions contained in article 51 of the UN Charter – the only exception to the prohibition on the use of force outside force authorised by the UN Security Council.

To that end state parties agreed to maintain and develop their individual and collective capacity to resist armed attack and consult when in the opinion of any of them their territorial integrity, political independence or security is threatened.

Thus the moment the Polish government was of the opinion the missiles that killed its citizens were probably fired by Ukraine in self-defence, the Nato alliance had no defence function to perform.

The most scary article in the Nato treaty is article 5. Scary because it is read literally instead of purposefully. It says that an armed attack against one or more states of Nato in Europe or North America shall be considered an attack against them all who agree to assist the country attacked by taking such action as Nato thinks necessary, including the use of armed force, in order to restore and maintain the security of the North Atlantic area.

The purpose of article 5, however, is to defend against major and sustained attack against a state party not the odd or isolated incursion. Defensive action by the alliance is circumscribed by the UN Charter in two ways. First it can only engage in the use of armed force in self-defence recognised by article 51 of the UN Charter that is necessary and proportionate to restore and maintain the security of the North Atlantic area.

And second, any such action must immediately be reported to the Security Council and be terminated when the Security Council has taken measures necessary to restore and maintain international peace and security. However, the Nato treaty does not affect the obligations of members of the UN or the primary responsibility of the Security Council for the maintenance of international peace and security.

The only time article 5 was invoked was in 2001 when America was attacked by terrorists belonging to Al Quada, a terrorist organisation based in Afghanistan. They crashed hijacked airliners into the twin towers in New York and the Pentagon in Washington. An airliner en route to crash into the White House was brought down by the passengers before it reached its target. The attack on America on 9/11 was a clear case of a major attack within article 5.

The attack was directed from bases in Afghanistan and so Nato joined America in the use of massive force against that country that removed the Taliban from power. America’s war on terrorists across the globe was supported by Nato but the alliance stopped short of the US-UK attack on Iraq in 2003, as there was no proof it was in possession of weapons of mass destruction and Nato was not set up to engage in regime change.

Article 5 was not invoked by Britain when the Falkland Islands were invaded by Argentina in 1982 because the treaty is limited to an attack in Europe and the North America. The US did assist with intelligence, but Nato was not called upon.

Article 6 deems Europe to include any island within the jurisdiction of state parties in the Atlantic north of the Tropic of Cancer; US forces stationed in Europe; the territory of Turkey; and any ship or aircraft belonging to a state party in the Mediterranean Sea or the North Atlantic.

More to the point any attack on vital infrastructure of Nato countries such as gas pipelines or internet underwater cables would, as Nato Secretary General Stoltenberg told the BBC, trigger article 5.

Alper Ali Riza is a king’s counsel in the UK and a retired part time judge