“Loose lips sink ships”. That powerful World War Two propaganda poster deserves a reprint following last week’s muddle off the coast of Russian-occupied Crimea.

The law of the sea allows ships — including naval vessels — something called “innocent passage” through other countries’ territorial waters. The route must be convenient and the behavior peaceable. Russian warships regularly transit the English Channel on this basis.

The twist is that Russia had closed the waters off Crimea to “innocent passage” for six months until October 31, on the pretext of naval exercises. But Britain, like most countries, does not recognize Russian sovereignty over the Ukrainian peninsula and HMS Defender, en route from Odesa to Batumi, ignored the ban.

Russia issued some crossly worded warnings on the spot and in Moscow. Coastguard vessels tried to shadow the British vessel (but couldn’t keep up). Warplanes buzzed the ship: noisily, but ineffectively. Russia held a gunnery exercise at a safe but audible distance. The transit proceeded as planned.

But what was the plan? For a start, why did the British ship apparently go to “action stations” directly after leaving the Ukrainian port of Odesa? To exercise “innocent passage” ships must be in an unwarlike state. They may not, for example, aim or direct any weapons, or switch on fire-control radars or sonars (which “action stations” normally involves).

More broadly, what was the mission’s point? Was it to reinforce Ukraine’s legal ownership of Crimea? In which case, why not ask the authorities in Kyiv for permission for something a bit more muscular, like a joint exercise? “Innocent passage” necessarily involves departing as well as arriving, giving the Russians the chance to say that they chased away an intruder. Or was the aim to expose Russia’s red lines as a bluff? Amid the chest-beating, that is still unclear.

The muddled thinking laid the foundations for a Russian victory in the war of words. The Kremlin’s framing of events — a provocation followed by a tough response — to become the version echoed by news outlets all over the world.

That is a defeat not only for Britain but for its NATO allies and for Ukraine.

This is annoying because it was avoidable. The British official response was flat-footed. Officials should have prepared days (or weeks) in advance, briefing journalists on the precise aim of the mission and its strategic and legal context, and ensuring that friendly voices issued supportive tweets and statements. Instead, NATO and allied sources seemed taken by surprise. The lack of support was deafening.

On the day itself, Ministry of Defence press officers in London tried to say that nothing special was happening, while two sharp-eyed journalists on the ship were filing eye-witness accounts of what appeared to be a dramatic confrontation. That corroded credibility.

The lesson is simple: if you are going to do something that is likely to prompt a media storm, make sure you are lavishly and meticulously prepared for it, in both public relations and legal terms. Britain wasn’t.

Next time may be worse. A Royal Navy aircraft carrier and accompanying vessels are already heading the South China Sea for “freedom of navigation maneuvers”. It is likely that at least one of the warships will venture through the Taiwan straits, which happens to be the most convenient route for an “innocent passage” from South Korea to Vietnam. That will infuriate the mainland Chinese regime, which regards Taiwan as a rebel province, and any foreign naval presence near its shores as an intolerable menace.

If the British authorities end up looking unprepared, they will have nobody to blame but themselves — and again, other countries will pay the price.