On 25 May 1982, Argentine aircraft dropped three bombs on a British destroyer that was part of the fleet protecting the Falklands invasion force. The explosions started an inferno below deck and blew a large hole below the waterline in the ship's port side. Water poured in, and within a few minutes HMS Coventry was listing by 20 degrees, powerless, ablaze and adrift in the South Atlantic. Her dazed captain, David Hart Dyke, managed eventually to escape from the wreckage of the operations room and climb up twisted ladders to the bridge, from where he thought he could "exercise some authority and get the ship heading in the right direction".

Intense heat had melted his anti-flash gloves into his hands and wrists, so he picked out pieces of rubber from his flesh and tore away folds of skin that hung loose. Otherwise, there was little he could do but watch his crew abandon ship. "It was all remarkably orderly and calm," he wrote in Four Weeks in May, his account of the Coventry's last voyage. "I never discovered who gave the general order to abandon ship. Perhaps no one did. But people very sensibly just carried on and did it. It was the only thing to do. I presume I had been considered a casualty and no longer fit to command the ship or give any orders."

Nonetheless, Hart Dyke stayed aboard the Coventry until the deck stood at a steep angle to the sea and everyone else had jumped overboard, including a Chinese laundryman who couldn't swim. "I was being implored to leave by people shouting to me from their liferafts. The time had clearly come … I walked down the ship's side, jumped the last two feet into the water and swam to a liferaft about 20 yards away [where] I was pulled in … by someone with a cheerful smile who said: 'There you are, sir, it worked.'" This man turned out to be a petty officer who earlier in the voyage had given Hart Dyke a prayer to St Joseph typed on a card, which guaranteed that anyone who kept it about their person would never die suddenly or by drowning. It was still in the captain's pocket.

Nineteen of the Coventry's crew died that day, but more than 260 were saved. By his own admission, Hart Dyke had little to do with their rescue. He could have quit his ship 10 minutes before the Chinese laundryman took the plunge and the outcome would have been neither better nor worse. Still, the captain believed that "certain routines are well worth preserving if at all possible when everything about you is uncertain". On the voyage south, this belief had been exemplified when every afternoon at 4pm a steward had delivered a slice of toast spread with Marmite and a cup of lapsang souchong to the captain as he stood watch on the bridge.

A ship foundering beneath you was hardly "routine" in that regular tea-and-toast sense: it was an unusual matter of life and death. But a well-instilled concept of duty told the captain how he must behave as the seafarer with ultimate responsibility for the ship and her crew: he must, if it could at all be managed, be the last man off. And so, while his prolonged stay on the Coventry didn't alter the number of casualties, it had perhaps done something else. Quite possibly – I don't know – it made everyone who witnessed it feel better both about themselves and the Royal Navy, the historic institution to which they belonged. More certainly, though Hart Dyke doesn't say so, it prevented many years of anguished reflection on his part over how he might have conducted himself differently at that moment.

How much more enviable he is than the Costa Concordia's wretched captain, Francesco Schettino, even without taking into account Hart Dyke's likely satisfaction at the popular success of his daughter, the actor and comedian Miranda Hart. But then – the post-religious, post-heroic thought – how much less enviable he would be to us, the living, if he were dead, if his concept of duty had killed him.

Several survivors from the Costa Concordia said that the disaster had been "just like a film", implying that it had reminded them of typical scenes in Titanic movies when the sea flows down corridors, chairs in the dining saloon float away, and what had been luxury (a cigar box, say) turns into a kind of naivety. Of course, to compare the two disasters is absurd: there are so many major differences. This week a minor one got the most play. While Schettino took prematurely to a lifeboat, Captain EJ Smith stayed aboard and went down with the ship.

The inscription below Smith's memorial statue in Lichfield, his birthplace, says he bequeathed "to his countrymen the memory and example of a great heart, a brave life and a heroic death", and carries a simple instruction: "Be British." Many of these words can be contested. We simply can't know how heroically Smith faced death, or even if he lived his life with anything more than a seaman's ordinary fortitude. George Bernard Shaw, writing a month after the Titanic sank, wondered about the "effects of a sensational catastrophe on a modern nation". Rather than weeping, prayer or sympathy for the bereaved, the result was "an explosion of outrageous romantic lying". The typical British shipwreck, Shaw wrote, had three "romantic demands" in particular: that the cry "Women and children first" should be heard, that all men aboard ("except the foreigners") should be heroes, and the captain a superhero, and that "everybody should face death without a tremor".

Shaw traced the origins of these expectations to the wreck of the Birkenhead, a troopship (and one of the Royal Navy's earliest steamships) that had hit a rock and foundered off the coast of South Africa in 1852.

While the few women and children on board were being loaded into the boats, the troops held ranks at attention on deck, even though the ship was breaking up beneath them. Hundreds died, including all the senior naval officers. A story of self-sacrifice and stoicism set a pattern for behaviour in Britain's merchant and military navies that enhanced, and sometimes confused, a captain's traditional responsibilities for the welfare of his ship and crew. The "Birkenhead drill" meant a seafarer stared death in the eye while the weaker sex was rowed to safety. In the 18th century, a captain could be both a patriarch and a tyrant, a drinker and flogger. Now, as he took his seat among his passengers at that new Victorian social arrangement, the captain's table, he became a kindlier and nobler father figure. Still a patriarch, but one who would place your needs and life above his own even to the ultimate sacrifice; or so the story went.

Chivalry at sea became an essential British ideal, and proof of the superiority of Anglo-Saxons (a category that included North Americans and most northern Europeans) over more panicky peoples from the south and east. The annals of old shipwrecks are filled with implications of their alleged poor behaviour. "I saw a lot of Latin people all along the ship's rails," recalled the Titanic's fifth officer, Harold Lowe. "They were glaring more or less like wild beasts, ready to spring." No Birkenhead drill for him: Lowe was sitting in a lifeboat at the time, being lowered past the still-crowded upper decks, but the awkwardness of his position as an officer leaving his passengers behind to drown seems never to have occurred to him. "Latins" weren't to be trusted in an emergency, and therefore didn't count.

The spectre now haunting Italy is that this label has stuck. "We've gone straight into the Titanic nightmare [and] Italy is once again the laughing stock of foreign newspapers," wrote a blogger, Caterina Soffici, this week. In Il Giornale, the columnist Cristiano Gatti wrote that the rest of the world would be delighted to rediscover "the same old rascally Italians: those unreliable cowards who turn and run in war and flee like rabbits from the ship, even if they are in command". But are either of these statements really true? People who know about ships and seafaring in Britain take pity on Schettino, rather than laugh at him. They puzzle over the course he took that led to the collision with the reef, they wonder how many people were on the bridge with him at the time, and why nobody raised a warning. Perhaps they snigger a little at his account of tripping and falling into a lifeboat ("How odd that his first officer seems to have done the same thing"), but on the whole they understand the torrent of guilt and self-recrimination that must threaten to overwhelm him, first for losing a ship and so many lives and, second, for his subsequent behaviour. None, at least of those I talked to, went as far as Professor Craig Allen of the US Coastguard Academy and accused him of "abject cowardice".

But his transgression is enormous. The rule that a captain must be the last man (or woman) to leave a ship in difficulties is never written down, but everywhere understood. In the words of a former P&O captain: "At sea, you have a great sense of responsibility for the people who are beneath you – it's moral as well as legal. You need to stay as long as anyone else remains."

In this altruistic sense, the mystique of captaincy has survived into its third century. Sentiment, if not always practicality, will ensure it continues. For who can resist the gallantry of David Hart Dyke staying aboard the tilting hull of HMS Coventry, or Noel Coward and what remains of his crew clinging to their life-raft in In Which We Serve, and Coward commanding, as his destroyer finally goes down: "Three cheers for the ship!"