Few would describe the resignation of David Petraeus in such tawdry circumstances as anything other than a tragedy - for himself, for his family and for the other families involved. The retired general had been head of the US Central Intelligence Agency for just 18 months; he was one of America's most decorated commanders, lauded for devising and executing the ''surge'' that brought chaotic, post-invasion Iraq under something like control. He had been spoken of as a possible future president.
His 38-year marriage to Holly, herself from a distinguished military line and with solid career achievements of her own, was held up as an example to American military couples everywhere.
It is at this point, perhaps, the first warning drum rolls might have sounded. The partnership of Al and Tipper Gore - the last exemplar of all-American family values, came to grief in the aftermath of his failure to become president.
The chequered relationship of Bill and Hillary Clinton, on the other hand, remains pretty much intact.
Prominent Americans who allow themselves to become marriage paragons clearly invite trouble.
For the raunchiness of Hollywood and the permissiveness of New York, American culture has a deeply conformist and puritanical strain that is as pronounced today as ever - perhaps even more so for those in public life. How else to explain why another accomplished general, Dwight Eisenhower, conducted a long affair with impunity, why JFK's promiscuity was no bar to his holding the highest office, while Clinton was impeached for covering up relations with Monica Lewinsky?
Politics, double standards and the vicissitudes of the moral climate all determine the official response to adultery, and there have been plenty of Americans in recent days arguing that Petraeus did not need to fall on his sword for a short affair that both parties accepted was over.
President Obama's first instinct, too, it seems, was to reject the proffered resignation as honourable but unnecessary.
In the end, Obama's hand was probably forced by the position Petraeus held. For a senior general to take a mistress is one thing. When that general is head of the CIA, it is quite another. During the Cold War, the chief risk would have been blackmail, but any covert behaviour that exposes personal weakness inevitably makes the perpetrator vulnerable. Petraeus was right to judge he could not continue in his post, and Obama was right to let him go.
But there are other reasons, at least as cogent, why Obama may have little reason to regret the loss.
Although the two had reached a modus vivendi during Obama's first term, the commander and the President never saw exactly eye to eye.
In one way this was no disaster. After warily taking each other's measure, these intelligent, rather intellectual, men came to enjoy batting around their different ideas.
Petraeus, though, had come to prominence under George W. Bush, attaining influence that, strictly speaking, exceeded his military rank.
When he spoke in public, as he increasingly did to explain his counter-insurgency tactics in Iraq, he betrayed a certain vanity and arrogance. Such vices - hardly unique among top commanders - sat uncomfortably with his reputation as an ascetic soldier's soldier. He also showed impatience with those he saw as too dim to understand, and a barely disguised petulance when challenged.
The ''surge'' was costly in both Iraqi and US lives, but it turned the tide of the insurgency and elevated an already revered military man into a strategist up there with the best. America's gratitude was understandable: Petraeus had extricated the US and its then President from an adventure that seemed on its way to becoming a second Vietnam. It was now possible to envisage a peaceful Iraq, and, for Obama, as presidential candidate, to advocate withdrawal as a realistic, as well as popular, proposition.
Once in the White House, however, Obama had his sights not just on withdrawal from Iraq - a war he regarded as a mistake - but on trying to win what he saw as the more significant conflict in Afghanistan. After months of apparent dithering and several returns to the drawing board, Obama agreed to the Afghan ''surge'', as recommended by Petraeus - whom he had inherited as head of Central Command - and it fell to Petraeus to implement.
It was never obvious, however, either that an Iraq-style ''surge'' would work in Afghanistan, or that Obama truly believed in it - hence perhaps the delays, and the fact that it was wound down soon after it began.
Had Obama more experience as President, he might have had the courage to follow the diametrically opposite advice coming from his ambassador in Kabul, a former military man, Karl Eikenberry.
If he had, an earlier withdrawal from Afghanistan might have been possible. In snubbing Petraeus, though, he might have created a powerful enemy in Washington.
It is too soon to decide how much of the respect paid to Petraeus as a military genius is deserved and how much reflects canny political presentation. It is too soon, also, to say whether his tenure helped or hindered the CIA. But his downfall, and undoubted personal tragedy, give a more confident President a chance to trust his own judgement. His second-term security policy may be all the better for that. The Independent