Donald Trump’s first national security adviser pushed so hard for the Pentagon to cooperate with the Russian military that his initiative would likely have broken the law if it had ever been enacted.

Four current and former Pentagon officials told The Daily Beast that during Michael Flynn’s brief White House tenure, the retired general advocated for the expansion of a relatively narrow military communications channel—one meant to keep U.S. and Russian pilots safe from one another—to see if the two nations could jointly fight the so-called Islamic State.

The initiative never went anywhere, in part because of opposition from the Pentagon and from U.S. Central Command; a legal prohibition set by Congress; and, ultimately, Flynn’s firing.

Inside the Pentagon, “there was a lot of fear that we’d move to outright cooperation [with Russia] through this channel,” according to a former senior defense official.

Whatever prospects it may have had died after Defense Secretary James Mattis made clear that he would not sign any required authorization to green-light cooperation, according to two knowledgeable former senior defense officials.

Although the plan was “ill-defined,” a senior defense official said, Pentagon officials were aghast at what they understood as a move by Flynn to sidle up to Russia—part of a closeness that ultimately got Flynn fired, and one that fit a pattern of extending an olive branch to a Kremlin that U.S. intelligence had concluded interfered in the presidential election on Trump’s behalf.

“Everyone knew where it was coming from,” the senior defense official said, referring to Flynn.

And it wasn’t the only such measure. Jared Kushner, Trump’s son-in-law and a senior adviser, reportedly sought in early December to route around U.S. intelligence through a backchannel to the Kremlin, according to intercepted communications from Kislyak. The following month, private military contractor chief Erik Prince, the brother of Trump’s education secretary, met with a Putin confidante in the Seychelles, a backchannel brokered by an Emirati crown prince, Mohamed bin Zayed al-Nahyan, according to The Washington Post, to test Russia’s commitment to Iran. Even after Flynn left government, his NSC aides were still interested in lifting oil sanctions on Russia, The Daily Beast’s Kim Dozier reported, despite all-consuming FBI and congressional investigations into ties between Trump deputies and the Russians.

In 2015, Russia sent its military to Syria to bolster the regime of proxy president Bashar Assad. U.S. aircraft and special operations forces were already attacking ISIS in northeastern Syria. With the proximity between the two global powers’ air forces raising the risk of an accidental confrontation, the Pentagon and the Kremlin established a communications line, known as the “deconfliction channel,” to mitigate the danger.

By then, Russia had swallowed up Crimea from Ukraine, and the GOP-controlled Congress took a step that ensured the purpose of the deconfliction channel could not legally expand. Beginning in 2015, the annual defense authorization bill, known as the NDAA, contained a provision barring “any bilateral military-to-military cooperation between the Governments of the United States and the Russian Federation” without a waiver from the secretary of defense.

The risk to the pilots is real, as several aircraft near-misses have occurred in Syria, even with the deconfliction channel open. And that led, over the past year, to what some Pentagon officials considered a risk of mission creep.

One persistent idea, emerging from the Pentagon-based Joint Staff and CENTCOM, was to discuss with the Russians keeping their missions on the opposite side of Syria from the American-led coalition’s. It seemed viable, as the U.S. typically bombs ISIS far from the Assad regime positions Russia defends. But while the idea would not amount to cooperation with Russia, Pentagon officials have worried that it looks too much like great Western powers agreeing in secret to a de facto imperial carve-up of Syria.

Another idea, known as “Enhanced Deconfliction,” emerged last fall, before the election. Advocated by General Joseph Dunford, the chairman of the Joint Chiefs of Staff, and his strategic planning chief, Lt. General Kenneth “Frank” McKenzie Jr., Enhanced Deconfliction sought to expand the deconfliction channel, making it more of a forum for senior-level military discussion, and without Pentagon policy officials on the line. But McKenzie, whose planning shop put together a memo on the idea, was vague about what the purpose of the higher-level talks would be. (Some understood it to include a technology upgrade.) The outgoing defense secretary, Ashton Carter, nixed the idea.

Several former defense officials do not consider Enhanced Deconfliction to be a sop to Trump or his closeness to Russia. Instead, they understood it as the military taking an opportunity to see what it could get out of Barack Obama’s successor. When the idea began floating around the Joint Staff, most at the Pentagon assumed Hillary Clinton would be their next commander in chief.

Into this dynamic stepped Mike Flynn.

But in January, Flynn went beyond any earlier proposal to hyperturbocharge the deconfliction channel.

Flynn’s comfort with Russia had been on display for years. As chief of the Defense Intelligence Agency, he visited the Moscow headquarters of Russian military intelligence and later boasted of being the first U.S. official to ever do so. In December 2015, he was paid tens of thousands to speak at a Moscow gala for propaganda network RT, something he did not disclose as required to the Army. In a mid-2016 interview, Flynn said that if the U.S. and USSR could unite against Hitler, Washington and Moscow could unite against ISIS: “We have a problem with radical Islamism and I actually think that we could work together with them against this enemy.”

Accordingly, Flynn, through the NSC, began suggesting the Pentagon embrace Russia in Syria. A senior defense official summarized Flynn’s entreaties as: “Well, we should work more with the Russians, so we’re fighting the same enemy in Syria.” Although Flynn never communicated a formal plan or articulated an actual series of steps, he wanted the Pentagon to use the deconfliction channel to explore what the Russians considered possible for a team-up against ISIS.

If put into effect, such a proposal would clearly violate the NDAA prohibition on cooperation with Russia. A cadre of Pentagon lawyers had already aggressively reviewed the provision and provided guidance to keep the Pentagon on the right side of the law. That contributed to Pentagon opposition to a 2016 proposal from John Kerry to expand intelligence sharing with Russia over Syria in order to keep the Russians aboard a ceasefire.

Flynn’s attorney did not respond to a request for comment.

Whatever openness there was in the Pentagon and CENTCOM to expanding the deconfliction channel, officials were highly wary that what Flynn wanted was a step too far. Not only would the NDAA provision be an obstacle, the initiative rested on a dubious premise: that Russia is in Syria to fight ISIS. While Russia maintains that its intervention in the Syrian civil war is a counterterrorism mission, in practice, Russia only seems to find terrorists where the Assad regime meets resistance, leaving ISIS-held territory to the U.S. and its allies to assault.

CENTCOM did not buy into Flynn’s proposal, the senior Pentagon official said. Pentagon officials were alarmed that the deconfliction channel was about to transform into a mechanism for banned cooperation with a U.S. adversary. Not that there was much to actually buy into: The official described Flynn’s idea as “vaguely aspirational,” rather than programmatic. Initially, defense officials slow-rolled the White House idea.

Then, in February, new Pentagon chief Jim Mattis made clear that doing anything beyond talking to Russia about service member safety would require his personal imprimatur. Two knowledgeable former officials said Mattis refused to issue the waiver under NDAA.

However, in recent weeks, the Pentagon and Russia have opened up a new military communications channel, one that runs at the three-star general and flag officer level. The Joint Staff’s McKenzie is on the American end of the phone.

Flynn’s proposal, on the other hand, ultimately went nowhere. On Feb. 14, Trump fired him, ostensibly for misleading Vice President Mike Pence over conversations Flynn had with Russian Ambassador Sergey Kislyak about relaxing U.S. sanctions. Whatever proposal Flynn had in mind for military cooperation in Syria left the White House with him.

Though nothing came of Flynn’s envisioned cooperation with the Russian military, the initiative he sought would have gone beyond repurposing a line of communication and placed the U.S. military alongside its Russian counterpart at a time when traditional U.S. allies were nervously watching the White House for signs of a Russian tilt. Despite Mattis’ opposition, had Flynn remained atop the NSC, it is possible that he would have continued his push.

“He was gone too fast,” a current senior defense official said, “and it never had a chance to gather steam.”