The fall from grace of retired Lieutenant General Mike Flynn is one of the strangest sagas in the annals of America’s military and intelligence services. Just one year ago, his star could hardly have been more ascendant, named as the National Security Advisor to newly-elected President Donald Trump. However, he flamed out of that job in just 24 days, a record. Then, last week, he pleaded guilty to lying to the FBI about discussions with top Russians, leaving his reputation is in tatters.

How all this happened will be debated for years as the full saga of the Trump White House’s secret ties to Moscow unfolds and Special Counsel Robert Mueller’s investigation moves forward like a steamroller, slowly crushing all in its wake. Flynn, the military intelligence professional turned felon, will feature prominently in that sordid story. Now that he’s cooperating with Mueller against President Trump, copping per his plea deal to a relatively minor charge that he may serve no jail time for, Flynn’s role has changed, but it’s no less important.

Just how deeply enmeshed Flynn was with the Russians is now coming into focus. Public embarrassments like appearing at the 10th anniversary gala for RT, Moscow’s propaganda network—including sitting at the head table with Vladimir Putin, Russia’s president—were just the tip of the iceberg. That Flynn took Kremlin money for that controversial appearance should have hinted at worse misdeeds.

For instance, Flynn was lobbying for Russian interests, including lucrative nuclear power deals around the world. This is hardly a normal retirement job for pensioned U.S. Army generals. It now appears Flynn was involved with this while serving as Trump’s national security consigliere. He’s reported to have texted a business colleague that a big nuclear deal was “good to go,” meaning Flynn could now get sanctions lifted off Russia, in the middle of Trump’s inaugural address last January.

What makes Flynn’s implosion especially shocking is this represents his second major career blow-up in five years. His initial fall from grace came in August 2014, when President Barack Obama cashiered him as the head of the Defense Intelligence Agency after two difficult years in that job. Although Flynn, in his usual dissimulating fashion, portrayed his firing as a political act—weak President Obama, unserious about the jihadist threat, was threatened by Flynn’s straight talk about terrorism, the story went—the truth is Flynn was dumped from DIA for incompetence. That seldom happens in Washington, and it is nearly unheard-of at top levels of our Intelligence Community.

His tenure there was a disaster, marred by arrogance, cluelessness, and gross mismanagement. As I’ve previously reported:

DIA has always been an also-ran in our Intelligence Community—a dumping ground where military careers go to die more often than prosper—but Flynn believed he could be the boss who turned DIA around to match CIA and NSA in the Washington spy game. Alas, he was wrong.

The civilian workforce at DIA is uninspired even by Beltway standards, and they objected when Flynn repeatedly threatened them with firing if they didn’t submit to his radical plans for the agency. It turned out Flynn was better at thinking about Big Ideas than actually implementing them, and his reform plans for DIA went essentially nowhere.

After two years under Flynn, DIA employees had enough and were in more-or-less open revolt. The final straw came with a bizarre presentation to the workforce by a staffer which encouraged women to not be “Plain Jane” and wear makeup at work: “No flats…Paint your nails…Brunettes have more leeway with vibrant colors than blondes or redheads.”

Although Flynn apologized to his agency, the damage was done. The White House had no choice but to move him out, along with his deputy—a rare move in the Department of Defense to cashier a whole leadership team.

In the aftermath of Flynn’s epic flameout at DIA, it merits asking why he was ever considered for that job at all. There’s an interesting backstory here that requires a bit of unpacking yet reveals the essential fraudulence of the entire Flynn enterprise.

Commissioned in the Army in 1981, for most of his career Flynn was never a major player in the Army or the IC. He was a tactical intelligence guy, and he fatefully lashed himself to Stanley McChrystal, one of the fastest-rising generals in the Army after 9/11. Flynn’s career rose between 2004 and 2007, when he served as the intelligence boss for the Pentagon’s Joint Special Operations Command, the spooky snake-eaters who at the time were killing terrorists all over Iraq and Afghanistan. In the mid-aughts, under General McChrystal, JSOC was transformed into a highly lethal secret outfit, and Flynn played a major role there.

Specifically, Flynn oversaw the development of timely, multi-source tactical intelligence that aided JSOC in killing terrorists at an unprecedented rate. Intelligence-driven targeting of bad guys was a big hit with the brass inside the Beltway, and Flynn’s name began to get noticed beyond JSOC. There were always whispers, however, that Flynn was claiming credit for important work done by his underlings, which wouldn’t be unusual in our military.

Flynn was still a relative unknown in spy circles, but that changed at the beginning of 2010, when a sensational study appeared that lambasted American intelligence performance in Afghanistan. Titled Fixing Intel, this was a wonky jeremiad that pulled no punches, using words like “marginally relevant,” “ignorant,” “hazy,” and “incurious” to describe U.S. intelligence work in Afghanistan in a scathing fashion.

What made this particularly odd was the study’s author was the intelligence boss of U.S. and NATO forces in Afghanistan at the time: Mike Flynn. He listed himself as the lead author, alongside two junior analysts. It’s not every day that the boss publicly attacks his own organization, recommending its complete overhaul on grounds that it has utterly failed.

Even more noteworthy was that the study was published by a Washington think-tank, the Center for New American Security. Flynn had jumped outside the Pentagon to attack his own organization, something that troubled some policymakers in the nation’s capital. However, as a means of getting publicity, this was a brilliant ploy, and Flynn immediately became the talk of egghead cocktail parties in Washington.

Fixing Intel was released by CNAS with fanfare, including a key plug by Tom Ricks, a CNAS official who had long been the doyen of military reporting inside the Beltway. With Ricks’ endorsement, Flynn was now officially a man with Big Ideas, and his star rose quickly inside the secret bureaucracy. Before long, he was plucked from Afghanistan to take a plum senior IC staff job in Washington, which introduced him to the right people. Only a few months later, in April 2012, Mike Flynn was nominated by the White House to take over DIA. The rest of the story, we know.

Except there was a key piece missing until just a few days ago. Tom Ricks played a pivotal role in Flynn’s rapid rise in Washington. However, he now wonders if he “helped create a monster,” to use Ricks’ own words. In a shocking column he published last week, Ricks admitted he got CNAS to run Flynn’s study in January 2010. Flynn’s harsh critique was important and needed an airing, Ricks explained: “He seemed to be a breath of fresh air, exactly what the military establishment needed.” However, there’s a big problem with that narrative, as Ricks now concedes:

I have reason to suspect Flynn may have had little role in actually writing the paper. On the other hand, he read it, saw that it was good, and agreed to lend his name—and rank—to it. His endorsement gave the paper a major boost. Otherwise it likely would have gone nowhere, and Flynn might now be a name unknown.

It’s not unusual for a top official to lend his name to a wonky study that otherwise might not get read by anyone. However, Flynn listed himself as the study’s lead author—which he was not. This was strongly suspected at the time in intelligence circles, something that Ricks seems to have missed—with fateful consequences.

Mike Flynn was never the savvy intelligence intellectual he pretended to be, which explains why his directorship at DIA was such a disaster. While a competent tactical intelligence guy, Flynn had no idea how the big game was played inside the Beltway, so he dropped the ball when he was let on the field. This also explains how Flynn seemed to have no idea that his calls to the Russian embassy might be intercepted by the FBI, an astonishing ignorance for a career intelligence officer. Then again, there’s a lot that Mike Flynn ought to have known but somehow didn’t.

John Schindler is a security expert and former National Security Agency analyst and counterintelligence officer. A specialist in espionage and terrorism, he’s also been a Navy officer and a War College professor. He’s published four books and is on Twitter at @20committee.