It’s clear that Robert MacLean blew the whistle on an ill-conceived plan to remove federal air marshals from long distance flights in 2003 — just days after a terrifying suicide hijacking alert — and lost his job as a result.

But why did it take the Department of Homeland Security three more years to fire him?

MacLean, of Ladera Ranch, wants his job back, and laws may be changing to make that possible (see more on that below). But, in the meantime, he is leaving little to chance: In new court filings that read a bit like a soap opera, MacLean says that his boss — Frank Donzanti — didn’t want to fire him for this breach of sensitive security information, but that Donzanti was engaged in “an illicit affair with a female subordinate, on whom he bestowed numerous professional favors.” Because of said affair, Donzanti was powerless to oppose the will of the Big Boss — Thomas Quinn — who wanted to rid the air marshal program of whistle-blowers and troublemakers like MacLean, the filings say.

“Director Quinn protected Mr. Donzanti from discipline for his blatant violation of Agency regulations… in exchange for Mr. Donzanti carrying out Director Quinn’s instructions to remove (MacLean),” the papers say.

MacLean was also persona non grata because of his standing as an officer in the air marshals’ professional association, which was fighting management over things like military-style buzz cuts and formal suits, which FAMs said made them clear targets for terrorists and undermined the purpose of the air marshal program.

MacLean seeks to get this bit of juice before the administrative law judge who is pondering his fate (as Donzanti was recently demoted). He also submits as new evidence a recent report from the Department of Homeland Security’s Inspector General, which takes the agency to task for its own breaches of sensitive security information— specifically, mistakenly posting secret screening guidelines on the Internet.

The agency’s policies on SSI are inconsistent and confusing, the Inspector General concluded. So should MacLean have been fired for breaching them, when the agency itself can’t get it right?

The Transportation Security Administration has asked the judge to strike MacLean’s motion from the record for procedural, and other, reasons. “The proffered evidence is highly speculative, and even if true, is irrelevant to this proceeding,” the government says.

And the inadvertent SSI disclosures addressed in the Inspector General’s report are different from MacLean’s misconduct, “which was intentional disclosure of SSI to a news reporter,” the government says.

MacLean’s attorney, Tom Devine of the Government Accountability Project, responded to the government’s response:

“The development about Mr. Donanti was not offered to impugn his character,” it says. “It demonstrates that he had a conflict of interest, because his professional survival depended on acting as the agency’s hatchet man against a problematic Federal Law Enforcement Officer’s Association (FLEOA) leader.”

And the Inspector General’s report on the mistaken public release of SSI is, indeed, relevant to MacLean’s case, Devine writes. “The remaining charge at issue does not allege that Mr. MacLean intentionally disclosed SSI information; the basis for termination is strict liability for releasing it at all. However, the OIG (Office of the Inspector General) report does not reference any discipline against the TSA officials responsible for the latest release. As a result, this is highly relevant to demonstrate that the agency engaged in disparate, discriminatory treatment of him on the SSI issue, because it was retaliating against him for protected activity such as his public statement as a FLEOA spokesman.”

Administrative judge Franklin Kang will make a decision on whether to accept the evidence in coming weeks — but much is happening on the whistle-blower front in the meantime, which could affect MacLean’s case.

Bills are being drafted in the House and Senate to give whistle-blowers the right to jury trials on retaliation claims — which they certainly don’t have now, as MacLean will tell you.

The bills would also lift gag rules imposed by some national security agencies, and strengthen rules against penalizing whistle-blowers who report wrongdoing to Congress, according to a report in USA Today which highlights MacLean’s case as a classic example of whistle-blower case gone awry.

“We’ve gone from pitch black night to sunrise, (but) the sun hasn’t come up yet,” Devine told the Post. “There’s got to be follow-through.”

The legislation was ready to pass the Senate by unanimous consent just before Christmas, Devine told us, but two retiring Republican senators (Bunning and Bond) put holds on the bill, which would require 60 votes to overcome (just like a filibuster). Two weeks ago, Bunning lifted his hold, but Bond hasn’t yet.

The White House, as well as Republican leaders of the Senate Homeland Security Committee, have been making an all-out effort with him, and Devine hopes the hold will be lifted and the bill will be out of Senate by the end of March.