Marine Gen. John R. Allen (Mohammad Ismail/Reuters) Marine Gen. John R. Allen (Mohammad Ismail/Reuters)

This blog post has been updated to correct the spelling of Leon Panetta’s name.

As Leon Panetta spends his final days as secretary of defense, there’s one decision I hope he’d like to do over: His order back in November to authorize a Defense Department investigation of thousands of e-mails from Gen. John R. Allen, which the FBI had just dumped in Panetta’s lap.

In today’s Washington culture, dropping the matter would have been an unusual and gutsy call. Panetta would have exposed himself to criticism for being insufficiently zealous, in order to protect the privacy and reputation of Allen, the Marine four-star general who by many accounts has been the best commander the U.S. has had in Afghanistan.

Once Panetta authorized the investigation, the damage to Allen was done. Having decided to launch a probe, the Pentagon of course had to tell reporters about it and put Allen’s promotion to become NATO commander in Brussels on hold. Then began the speculation about what Allen might have exchanged in his e-mail messages with Jill Kelley, the Tampa socialite who had tried to make herself useful to Centcom when Allen was commander.

Panetta apparently had felt he had no choice but to investigate the e-mails, given the advice he got from Pentagon lawyers. A senior defense official explained: “The secretary’s decision to refer the matter to the Department’s Inspector General was made upon the recommendation of senior civilian and military lawyers, who conducted an initial review of the materials. The secretary threaded the needle carefully. He believed Gen. Allen should remain in command [in Afghanistan] and should have the opportunity to be [NATO commander] following the I.G. review. This was a nuanced set of decisions, not a single decision.”

The investigation ended last month with the finding that was predicted months earlier by every official I talked to who had any inkling of what was in the e-mails: Allen had done nothing unbecoming an officer. There was some flirtatious language in the e-mail, racy phrases that might have been be embarrassing, but nothing more. Yet the damage to Allen and his family was done.

The next step would have been Senate confirmation for the NATO job, and another public kerfuffle. Given the way Washington works, it’s almost a certainty that someone would have leaked titillating language from the e-mails. Allen decided that he and his wife, who has been very ill, had had enough. He withdrew his name from consideration for the NATO post and will retire.

Government officials earn their “profiles in courage” when they do something they think is morally right — knowing that others will criticize it — and take the heat. Panetta has often fit that mold, and he will leave the Pentagon with a distinguished record as secretary. But I’d like to think this is one moment where Panetta wishes he had stopped an investigation that his gut should have told him would lead nowhere — and taken whatever criticism came his way.