The last few days have seen tragedy piled on apparent humiliation: the photographs of the four smiling young British men and women who died in a Warrior armoured personnel carrier patrolling Basra and, on the same day, the sailors from HMS Cornwall after their imprisonment in Tehran holding their press conference to explain their collusion with the Iranian propaganda machine.

Worse, Britain looked for diplomacy via the derided EU and UN to get its way. The tale of the 15 sailors and Marines is of temporisation, as if Britain still had an empire and we were formally in a 19th-century style colonial war with Iran. Apparently, we look like fools.

And yet... Beyond the imagery and the jingoism lies, at least in relation to Iran, an unappreciated success that points the way to more. After all, the sailors are home and there has been no deal. Better still, the Iranian government has revealed itself as a government prepared to flout international law and mistreat prisoners in its quest for an accommodation. Britain has clawed back a little of its shattered reputation and kept its head. Indeed, it has weakened Iran’s argument that it is an injured innocent and strengthened our own that the international community should be watchful of Iran’s nuclear ambitions. Soft power works.

For it’s 2007. Conflict is conducted very differently, as Blair has learnt the hard way. Shock-and-awe military tactics in the unilateral imposition of power may appeal to the video game mentality of the US military and political establishment, but they have created a horrid mess. This time round, with only weeks left in his prime ministership, Blair refused Bush’s offer of ratcheting up the military pressure on Iran by overflying Republican Guard positions; he even persuaded Bush to tone down the US’s planned military build-up. From day one, the British resorted to argument. The British sailors had been operating under a UN mandate at the request of the elected Iraqi government. The Iranian action had flouted international law, a claim the British made more easily because, for the first three days, the co-ordinates provided by the Iranians to justify their action placed the merchant vessel within Iraqi waters as well. Only when they realised their mistake did they adjust the co-ordinates to place the merchant vessel in Iranian waters, a correction so blatant that it made even the most sceptical of non-partisan governments aware that Britain might just have a case.

The received wisdom in Tehran and the London media is that this was a propaganda coup. I am less sure. Even before Friday’s press conference, few will have been credulous enough to believe that the confessions and thanks were spontaneous. Everyone suspected the context, now confirmed by the sailors, of constant psychological pressure, of being blindfolded and kept in solitary confinement.

Success in a war of wills between nation states is ever more about deploying soft power; being on the side of legitimacy, behaving authentically and winning arguments.

Thus Blair is right to claim victory for his dual-track strategy — talking to Tehran while working to intensify international pressure. There was much mockery from British jingoists about the success of getting the EU unreservedly to back the UK position, calling for the unconditional release of the prisoners, backed by a commitment to take appropriate action if the Iranians refused.

The EU has economic clout with Iran that it is prepared to use and Iran was concerned at the unexpected unanimity from its 27 members. The EU position put some muscle into what otherwise would have been little more than hand-wringing. Iran was losing the argument and facing growing isolation. Which, if it wants to pursue its strategy of building an uranium-enrichment plant, would be a disaster. The more it loses the argument, the more countries would vote for and adhere to a policy of tough economic sanctions. As the diplomatic encirclement over the sailors intensified, it needed to squeeze what propaganda it could from the incident, win face-saving assurances from Britain it would not trespass Iranian waters. This it did. Soft power is the new currency of international diplomacy and which the West has got in abundance if only it were to practise it. The tragedy of Iraq is that by invading without a renewed UN mandate the US and Britain put themselves on the wrong side of the law, trashing their soft power, as they have discovered, in the post-invasion settlement.

Last week showed how the game should be played and put down a marker for Middle Eastern policy in the future. Talking to one’s enemies and passing condemnatory motions in the EU and UN do not give the jingoistic adrenaline rush of machine-gun fire and missile attack, but ultimately they work. Blair has learnt his lessons the hard way. Let’s hope that Brown, more distrustful of the EU, has also learned them. — The Guardian