One of them has to be lying.

That conclusion is inescapable if you closely examine the sworn testimony of two erstwhile FBI allies, James Comey and Andrew McCabe, about the leaking episode that led to McCabe's firing in March. After all, two diametrically opposed accounts can't both be correct.

President Donald Trump has seized upon the situation — laid bare in a report from the Justice Department's inspector general — to assail both men, long among his favored targets for reasons having nothing to do with their veracity. "He LIED! LIED! LIED!" Trump wrote, in a veritable presidential tweet-gasm, hours after the McCabe report's release. "McCabe was totally controlled by Comey - McCabe is Comey!! No collusion, all made up by this den of thieves and lowlifes!"

More from ProPublica:

You're entitled to government transparency

Police are mislabeling anti-LGBTQ and other crimes as anti-heterosexual

Electionland

This is much more than a venomous 21st century personal duel — tweet versus tweet at 10 paces. The credibility of Comey and McCabe is crucial, giving Trump every incentive to tar them. The former has offered withering accounts of his interactions with the president. And given what the two men observed both before and after Trump sacked Comey, both could be called on for key testimony in a potential obstruction of justice charge against the president.

The truth is that, in this case, Trump is partially right: One or both of the FBI's former top officials is almost certainly lying. The irony is that the entire episode is at complete odds with Trump's long-running claim about a "Deep State" FBI cabal that's out to get him. The leak at issue, in fact, brought election-eve attention to a second investigation of the Clintons, news that helped Trump's campaign.

It's yet another improbable turn of events.

Comey and McCabe were both long thought to embody the square-jawed, gray-suited ideal of the honest G-man. And by all accounts, they were close colleagues. Comey elevated McCabe, over more traditional candidates, to be his deputy; McCabe then served as acting FBI director for three months after Comey's dismissal.

But they diverged dramatically in their testimony for the IG's investigation, which focused on a leak that McCabe orchestrated to the The Wall Street Journal about an FBI probe into the Clinton Foundation. In his damning 35-page report, the IG concluded that McCabe made an "improper media disclosure" and demonstrated "lack of candor," repeatedly lying about it under oath.

McCabe's punishment was swift: He was fired on March 16, just two days before he would have qualified for retirement, after 21 years at the FBI.

Comey's testimony, which the IG concluded was backed by the "overwhelming weight" of circumstantial evidence, was instrumental to the report's conclusions. In Comey's telling, he was ignorant of the original leak, and then misled about it. When he and McCabe discussed The Wall Street Journal article shortly after its publication nine days before the election, according to Comey's sworn testimony to the IG, McCabe professed bewilderment about the leak's source. Testified Comey: "I have a strong impression he conveyed to me, 'It wasn't me, boss.' And I don't think that was by saying those words. I think it was most likely by saying, 'I don't know how this shit gets in the media, or why would people talk about this kind of thing?' — words that I would fairly take as: 'I, Andy, didn't do it.'"

Comey has always portrayed himself as a model of probity. In public appearances and in his recent memoir, "A Higher Loyalty: Truth, Lies, and Leadership," he stresses the importance of "a fundamental commitment to the truth — especially in our public institutions and those who lead them." In his book's 312 pages, the word "truth" appears 73 times in various forms. There are 98 references to "lying" or "lies."

In interviews during the recent media blitz for his book, Comey cast the McCabe episode as reinforcing the importance of truth-telling and accountability. "Sometimes even good people do things they shouldn't do," Comey told CNN. "It's not acceptable in the FBI or the Justice Department for people to lack candor." (Comey declined a ProPublica request to discuss McCabe, emailing back that the matter is "painful and complicated, and I don't want to step into it." McCabe also declined to be interviewed.)

For his part, McCabe testified that he told Comey about the leak at the time, insisting that it's his old boss who has it wrong. McCabe's account is presented in detail in the IG's report, as well as in a series of press statements from McCabe and his lawyer, former DOJ inspector general Michael Bromwich.

Bromwich asserts the IG report falsely "paints Director Comey as a white knight carefully guarding FBI information." In Bromwich's view, Comey had "every incentive to distance himself" from the controversial leak. After all, he noted, Comey himself was being investigated by the IG for allegedly improper media disclosures. That report, focused on Comey's handling of the Clinton email case, is expected in a few weeks. It will likely spark a whole new round of scrutiny about leaking.

Meanwhile the president has reveled in the spectacle of two favorite targets turning on one another. Six days after the McCabe report came out, he tweeted: "James Comey just threw Andrew McCabe 'under the bus.' Inspector General's report on McCabe is a disaster for both of them! Getting a little (lot) of their own medicine?"

The easy part is concluding that someone was untruthful in this instance. The much harder point is trying to determine which person it was — and what to make of it.

Last year, I spent five months on assignment for ProPublica examining the FBI's handling of the Clinton email investigation — an exquisitely fraught case with career implications for all involved. The assignment offered some perspective into the trafficking of sensitive information in Washington, D.C. — and how the curious facts of the McCabe affair are distorting a series of events that in other, less politically raucous, times might have been unremarkable. And it's all been intensified by a drastic change in the political environment.

If you want to see the embodiment of the popular view of a government leak, Steven Spielberg's movie "The Post" provides a good example. It depicts The Washington Post's Katharine Graham and Ben Bradlee (played by Meryl Streep and Tom Hanks) as they wrestle with whether to publish secret documents known as the Pentagon Papers. Those papers were furtively photocopied and then handed over to journalists by civilian military contractor Daniel Ellsberg. Depending on your political perspective, Ellsberg was either a conscience-driven whistleblower exposing government deceit about the Vietnam War, or a traitor harming the interests of the U.S. government. But either way, the portrayal embodies the most traditional definition of leaking: an individual bringing to light information that those in power don't want revealed.

But there's a whole second category of leaks — that get less attention but are surely far more prevalent. (Nobody keeps statistics on these things.) These leaks occur when public officials disclose something, often with official approval, to advance the interests of their institutions and themselves.

The FBI is no exception to this practice. Outside of congressional hearings or public appearances, officials there are loath to be quoted in the press by name. "Background" briefings — where officials express opinions or describe events while shielded by agreements that they will be identified obliquely as, say, "sources familiar with the matter" — have long been common.

There are undoubtedly semantics involved. A government official trying, in his view, to inform the public, likely doesn't view himself as "leaking." Sure enough, in his book, Comey wrote that he told Trump that he "didn't do sneaky things" and he didn't leak. Similarly, at a Senate Judiciary Committee hearing last May, six days before Comey's firing, Iowa Sen. Charles Grassley asked him if he'd "ever been an anonymous source" or, in a separate question, if he had "ever authorized someone else at the FBI to be an anonymous source" for news reports about the investigations into Clinton's emails or Trump's Russia ties.

"Never," Comey replied to the first question. "No," was his response to the second.

My reporting about the FBI doesn't tie Comey to any disclosures directly provided or overtly "authorized." But it's fair to say there was a great deal written about the agency and its work — by The New York Times, The Washington Post, and the Journal, as well as ProPublica — that accurately recounted specific actions, meetings and thinking at the highest levels within the FBI. Many of those articles quoted "sources familiar with the matter." Comey's book confirmed many of these events in strikingly similar detail.

Comey has long been one of the most media-savvy officials in Washington. Days after his firing, as he later acknowledged in congressional testimony and in his book, Comey provided a close friend, Columbia University law professor Daniel Richman, with one of the memos he prepared memorializing his meetings with the president, and arranged for Richman to anonymously share its "substance" with a New York Times reporter, in hope of forcing the appointment of a special prosecutor.

Which brings us to Donald Trump. As a New York developer, he was widely reported to be an inveterate leaker, shamelessly inflating his reputation (as a businessman and lady's man) with a multi-decade stream of anonymously sourced tidbits planted in Gotham's tabloids. As a presidential candidate, he reveled in the hacked Clinton email revelations served up on Wikileaks.

In his actions as president, Trump has been less than consistent on the issue of leaking. For example, he revealed highly classified intelligence to Russia's ambassador and foreign minister during a May 2017 meeting in the Oval Office. And last month, Trump pardoned one time vice presidential chief of staff Scooter Libby, who was convicted of perjury and obstruction of justice for concealing the fact that he had leaked the identity of a CIA officer.

That hasn't stopped Trump (like many a president before him) from expressing outrage about leaking. In his case, he has conflated it with lying and threatening the nation's security. He has labored mightily to brand some of his critics with a scarlet L, as disseminators of America's secrets to "the enemy of the people" — the news media.

Trump called California Rep. Adam Schiff, the Democrat bird-dogging the Russia investigation, "the leakin' monster of no control." Former Director of National Intelligence James Clapper; former CIA Director John Brennan; Mark Warner, the ranking Democrat on the Senate Intelligence Committee — all were "liars and leakers." Comey, Trump declared over and over, was "a proven LEAKER & LIAR," who "gave up Classified Information (jail)." More recently, he reacted to embarrassing disclosures emanating from his own White House by calling the offenders "traitors and cowards."

Trump began targeting Comey and McCabe while a candidate in 2016, for reasons that had everything to do with politics — and nothing to do with leaks or lies.

Candidate Trump's opinion of the FBI director was transactional, ping-ponging with his view of whether Comey's latest action benefited him. He bashed Comey for his July 2016 announcement that there was no basis for charging Hillary Clinton in the FBI's investigation of her private email server; praised Comey in late October for announcing that he was reopening the case, after agents discovered new Clinton emails on Anthony Weiner's laptop; and attacked Comey again, days later, when he announced that examination of the new messages hadn't changed anything.

Trump then fired Comey less than four months after taking office, explaining in an NBC interview at the time that he'd been frustrated by the director's refusal to shut down the Russia investigation.

Trump's enmity toward McCabe has a partisan origin, stemming from reporting in an Oct. 23, 2016, Wall Street Journal story: During a failed bid for a Virginia state senate seat the year before, McCabe's wife Jill, running as a Democrat, had taken $467,500 in contributions from the political action committee of Gov. Terry McAuliffe, a close Clinton ally.

According to an FBI statement provided to the Journal, McCabe, who was a Republican, had played "no role" in the Virginia campaign, conferred with FBI ethics overseers about the matter, and had no responsibility for the Clinton email investigation until February 2016 — months after his wife's defeat — when Comey promoted him to deputy director.

No matter. Then-candidate Trump immediately tweeted out the story, telling campaign rallies that the situation was "absolutely disgraceful," sure proof that the FBI's email probe was "rigged."

Thus was the stage set for the "improper media disclosure" that led to McCabe's sacking.

As leaks go, what McCabe would provide was underwhelming. It didn't involve classified information. It didn't reveal much of a secret. And it was overshadowed by much bigger news.

This was a classic Washington leak: a calculated act of reputational enhancement (one that, not incidentally, also took a potshot at another agency). And how it occurred was telling. This was no secret conversation in a garage at midnight.

Instead, as laid out in the inspector general's report, it originated with a request by a reporter to the person officially designated by the FBI to handle such queries. Three senior officials then conferred before any information was released.

On Oct. 24, 2016, just two weeks before the presidential election, Devlin Barrett, who covered law enforcement for the Wall Street Journal, emailed FBI public affairs chief Michael Kortan, the agency's longtime official spokesman. Barrett had written the article that explored whether Jill McCabe's political ties had influenced the email probe — the article that Trump had seized upon.

Now, Barrett was pursuing a related story: He'd been told the FBI's deputy director had sought to chill a second Clinton probe, this one involving donations to the Clinton Foundation.

Kortan conferred with McCabe, who authorized the public affairs chief and Lisa Page, a key FBI attorney assigned to McCabe's office, to speak with Barrett on condition that they not be identified as the source of the information. (Page, then in the midst of an extra-marital affair with Pete Strzok, the FBI agent who had led the Clinton email probe, would later become a target of criticism after investigators discovered their text exchanges, which included remarks critical of Trump.)

During an initial call on Oct. 27, Barrett told the FBI's Kortan and Page that his sources were adamant that McCabe had issued orders to "stand down" on the Clinton Foundation investigation. Page quickly briefed McCabe, who later told investigators he considered this narrative "incredibly damaging." McCabe instructed Page to provide the reporter an anecdote designed to counter the "stand down" claim.

At the time, the FBI's investigation into the Clinton charity had been lingering for more than a year. Its existence was widely known in Washington, in part, top FBI officials suspected, because of whispers from Clinton-hating agents in the bureau's New York field office. It had been written about widely in the press.

But it was still officially secret, even as the rules for confirming investigations suddenly seemed less certain. A year earlier, Comey had publicly confirmed that the FBI was investigating Clinton's use of a private email server. In his book, Comey explains that the email probe was something "the whole world knew anyway"; making "no comment" about it seemed "increasingly silly." He cites DOJ policies allowing such disclosure regarding matters of "extraordinary public interest" or where investigative activity had already made it obvious. (In that case, Comey wrote, Attorney General Loretta Lynch had agreed with his decision.)

But when, at a hearing in July 2016, a Republican congressman asked Comey if the FBI was looking into the Clinton Foundation, he refused to confirm the probe. Comey testified that it was standard FBI practice to decline comment on "the existence or non-existence" of ongoing investigations.

Nonetheless, on Oct. 27, 2016, McCabe authorized Page and Kortan to furtively confirm to a reporter what Comey publicly would not.

Late that afternoon, speaking from Kortan's office at FBI headquarters, they told the Wall Street Journal's Barrett about a phone conversation McCabe had with Matt Axelrod, a top lieutenant to Deputy Attorney General Sally Yates, two months earlier. As the FBI officials related it, Axelrod was "very pissed off" that New York agents were still openly pursuing the Clinton Foundation probe. (Justice Department policy strongly discourages taking any overt investigative steps involving a political candidate close to an election.)

Page and Kortan told the Wall Street Journal reporter that McCabe had defended the investigation into the Clinton Foundation, saying: "Are you telling me that I need to shut down a validly predicated investigation?" That prompted Axelrod, "after a pause," to say, "Of course not," according to this account. (Axelrod, now in private practice, declined to discuss the matter.)

After the conversation, Page reported back to McCabe (who was out of town), texting: "We're done. He's going to look at his story again and will circle back with him in the morning."

Meanwhile, the Justice Department appeared to be deploying its own leaks to jab at the FBI. On Oct. 29, The Washington Post published an anonymously sourced story, headlined: "Justice Officials Warned FBI That Comey's Decision to Update Congress Was Not Consistent with Department Policy."

Strzok texted Page about the Post article the next day, concluding that Axelrod was the source. "Yeah. I saw it," Page replied. "Makes me feel WAY less bad about throwing him under the bus in the forthcoming CF [Clinton Foundation] article."

The Journal story was posted a short time later. The entire exchange that McCabe had leaked — including the dramatic "pause" in the conversation — appeared, attributed to "a person familiar with the probes," "one person close to Mr. McCabe," and "people familiar with the conversation."

But the material was buried inside a story that focused on new details about a far bigger revelation two days earlier: Comey's election-jarring announcement that he was reopening the email probe. McCabe's leak seemed trivial at the time.

A lot of things changed over the ensuing six months. Trump was elected president, for starters, and his campaign was under investigation. Trump began castigating the FBI on a regular basis. An agency that had historically been subject to less criticism and scrutiny than other agencies was suddenly being bashed by the president, its motivations and actions questioned.

So when Trump fired Comey, on May 9, 2017, McCabe found himself acting director of the FBI — facing the same kind of presidential pressure and attention that Comey had endured. Although McCabe didn't know it, a conversation he'd had earlier that day would light a fuse on his own FBI career.

Two agents from the FBI's inspection division, expanding an existing investigation of media leaks, had decided to interview the deputy director about the Oct. 30 Wall Street Journal story because it appeared to show someone had improperly revealed McCabe's private conversation with a Justice Department official.

This would be the first in a series of interviews with investigators in which McCabe, according to the inspector general, repeatedly lied and changed his story.

According to the IG report, McCabe told the agents on May 9 that he had "no idea" how the account of his conversation with the DOJ official got out. Three days later, they emailed him a draft statement of what he'd told them, asking him to sign and return it. The statement read in part: "I do not know the identity of the source of the information contained in the article. ... I gave no one authority to share any information relative to my interaction with the DOJ executive with any member of the media."

McCabe never signed the statement.

On July 28, investigators from the inspector general's office, in the midst of their separate inquiry into the Clinton email case, decided to interview McCabe after reviewing Page's text messages and discovering references to her meeting with the Journal reporter.

At this point, McCabe had had roughly seven weeks to refresh his recollection. But he stuck to his initial position. Asked on tape and under oath if Page had been authorized to talk to a reporter, McCabe replied, according to the IG report: "Not that I'm aware of." Questioned about texts that suggested otherwise, McCabe said: "I was not even in town during those days. So I can't tell you where she was or what she was doing."

Four days later, on Aug. 1, McCabe changed his stance. He called an assistant inspector general and said he "may" have authorized Page to speak to Barrett, after all.

On Aug. 18, in yet another conversation with investigators, McCabe admitted he'd "misspoke." He now "took ownership" of the leak.

That admission led the investigators to refer the matter to Michael Horowitz, the inspector general of the Justice Department, who launched his own probe on Aug. 31, 2017. (As it happens, McCabe's lawyer, Bromwich, had previously praised Horowitz, calling him "an experienced and highly regarded law enforcement professional" in an op-ed for The Washington Post in early 2017.)

By Nov. 29, when he was questioned again by investigators for the IG, McCabe seemed to be trying to offload some blame on his former boss. McCabe, now accompanied by a lawyer, detailed his claim that he'd told Comey he had disclosed the Axelrod conversation when they spoke on the day after the Journal story appeared. The director "did not react negatively," McCabe testified — instead telling his deputy it was "good" that he had made clear the FBI wouldn't buckle to political pressure.

McCabe also told the IG he didn't view what he'd done as revealing the existence of an investigation, explaining, "There really wasn't any discussion of the case, of the merits of the case, the targets and subjects of the case, so I did not see it as a disclosure about the Clinton Foundation case."

The inspector general's report served up a heap of evidence against McCabe from multiple sources. But it was Comey who served as perhaps the most damning witness. The report detailed his starkly conflicting account of their conversation about the Journal story.

In his testimony to the IG, Comey said McCabe had "definitely" not told him he was behind the leak. "…[J]ust to make sure there's no fuzz on it," he testified, "I did not authorize this. I would not have authorized it." The IG spelled out multiple reasons why Comey would not have viewed his deputy's disclosure with equanimity.

The first was a meeting with his executive team on Oct. 31, 2016, convened shortly before he discussed the Journal story with McCabe. There, Comey expressed dismay about all the leaks emanating from the bureau. According to notes Page took at the meeting, later cited in the IG report, Comey cited a "need to figure out how to get our folks to understand why leaks hurt our organization."

At the time, Comey was already being skewered for having revealed his decision to reopen the Clinton email investigation. He said he would never support confirming any investigation through a leak and noted his earlier refusal to disclose the Clinton Foundation probe. Discussing the conversation with Axelrod, he noted, was also sure to harm the FBI's already troubled relations with the Justice Department.

As one of the FBI's two top officials, McCabe had authority to share information with the media, a point he offered in his defense — but only after denying, then admitting, responsibility for the leak. The inspector general rejected his claim that this disclosure met the Justice Department's "public interest" standard. Instead, the report found, it was "an attempt to make himself look good by making senior [DOJ] leadership … look bad." McCabe, the report concluded, was primarily motivated by his desire to avoid "another personally damaging story."

To put it another way: It was a typical government leak. But with the FBI under critical examination in Trump-era Washington, it looked much more suspicious than it might have in the past, especially given McCabe's shifting story.

In late February, the IG privately sent his report to the FBI's Office of Professional Responsibility, which recommended McCabe's dismissal. Attorney General Jeff Sessions fired him on March 16.

Trump quickly tweeted: "Andrew McCabe FIRED, a great day for the hard working men and women of the FBI — A great day for Democracy. Sanctimonious James Comey was his boss and made McCabe look like a choirboy. He knew all about the lies and corruption going on at the highest levels of the FBI!"

In a series of media statements after his dismissal, McCabe, whose case has now been referred for possible criminal prosecution, blamed political pressure from Trump for his firing and made clear his determination to fight. He contended he answered investigators' questions "as completely and accurately as I could" during a chaotic time, and made efforts to correct his answers when he realized they were "not fully accurate or may have been misunderstood."

McCabe presented a detailed rebuttal that was included and discussed — but ultimately found unpersuasive — in the report. And his defense team told ProPublica they also have reviewed previously undisclosed emails proving that McCabe informed Comey that he was in contact with the Journal, which the IG chose to leave out of the report. They also assert that transcripts of Comey's interviews show he was uncertain in his recollections of what really happened. They say they are barred from providing details of these purportedly exonerating documents because they remain subject to a government non-disclosure agreement.

McCabe's team provided ProPublica with a copy of the NDA, which granted his lawyers access to "certain FBI-related information" on the condition that they not release anything "derived from or relating to FBI files" without "prior written authorization of the FBI." McCabe spokeswoman Melissa Schwartz said Bromwich has sought, but not received, release from the non-disclosure agreement. (A representative of the IG's office declined comment on the issue.)

It's certainly plausible to imagine that in an organization as hierarchical as the FBI — with its chief press officer coordinating the interaction with a major publication — Comey would normally have been made aware of McCabe's actions. (Kortan, who retired in February as assistant director for public affairs after surviving as the FBI's media chief for 18 years, declined to discuss the matter; the IG's report makes no mention of any testimony from him on the matter.)

The inspector general's report makes clear that he considered Comey's testimony more credible than McCabe's. But the same inspector general is about to release a second report, this one focused, among other matters, on Comey's actions and public disclosures in the Clinton email case. For all of Comey's professions to Trump that he wouldn't do anything "sneaky," the episode where he leaked one of his memos through a surrogate — while not involving any classified information (contrary to what Trump claims) — appears to fit that definition. And, as noted, descriptions in his book conspicuously match the views of "sources familiar with the matter" who were cited in past news articles.

Many legal experts — and deputy attorney general Rod Rosenstein — have already concluded that Comey's actions during the email investigation violated longstanding Justice Department policy. In the McCabe report, the IG embraced his view of events. In the report that is forthcoming, he may not fare as well.