On April 4, 2003, Col. Joseph Dowdy—whose 1st Marine Regiment was then fighting its way through a tangle of Iraqi villages south of Baghdad—was called to the tent of Gen. James Mattis and told he was being relieved of his command. A career Marine, Dowdy was stunned: Mattis’s action in the midst of a battlefield fight was nearly unprecedented and, as Dowdy knew, would mark the end of his military career. Adding to the humiliation, Mattis told Dowdy to remove his sidearm and hand it to him. “We’re going to give you a rest,” he said.

Dowdy had known that his job was in danger, the result of complaints from Mattis and his staff that he wasn’t moving his regiment quickly enough. But it’s not as if Dowdy was taking his time: his troopers had been involved in bitter firefights against tenacious “Saddam Fedayeen” killers every day for the previous two weeks. But Dowdy had no choice in the matter, so while he objected to Mattis’s action he packed up his gear, called his wife, returned to the U.S. and retired from the Marine Corps.

That Mattis acts quickly and decisively is part of his lore—it’s what good Marines do. But while quick and decisive might work on the battlefield, they’re not always a good fit for a secretary of defense. Mattis learned this earlier this month, after he fired John H. “Jay” Gibson II, the Pentagon’s first-ever Chief Management Officer and its third highest ranking official. The reason for the firing, as The Wall Street Journal’s Gordon Lubold reported on September 5, was for “lack of performance.”

The firing was immediately controversial, spurring under-the-radar resentments among senior defense officials in the Pentagon’s E-Ring where military and civilian managers huddle to run the world’s largest bureaucracy. “This doesn’t make any sense,” a senior Pentagon official told TAC. “Jay was CMO for seven months; he hadn’t even gotten his staff in place.”

Gibson came to Washington to oversee Mattis’s attempt to cut waste from the Pentagon budget by identifying savings that would lessen the ballooning impact of the Trump administration’s $670 billion defense spending proposal. Armed with an impressive resume (including a successful stint as an assistant secretary of the Air Force and deputy undersecretary of defense for management reform, where his efforts saved billions of dollars), Gibson was tasked with reforming Pentagon procedures in buying and developing weapons and in managing logistics and supply, technology systems, community services, human resources, and health care.

Gibson was given a broad mandate to “shake up the system,” which the deputy defense secretary Patrick Shanahan (the department’s number two official and Gibson’s boss) admitted would cause “screaming and yelling” from the Pentagon bureaucracy.

Even so, Gibson was told he would have the Trump administration’s support—which is why he decided to give up his post as president of XCOR Aerospace, a Texas company that develops rocket engines and space launch systems. “Jay did this over his wife’s objections,” a friend of Gibson and a senior official at a major private sector financial institution told TAC in a wide-ranging interview, “because he thought he could make a difference. He is a cracker-jack administrator; he knows how to dig and dig. So he came into D.C., started digging into the Pentagon budget and was fired. In my world, when that happens it isn’t because you’re doing a lousy job, but because you’re stepping on the wrong toes.”

In fact, as the senior Pentagon official with whom I spoke says, the toes that Gibson stepped on belonged to Patrick Shanahan, the deputy secretary of defense and a former vice president and general manager of Boeing Missile Defense Systems, a major Pentagon contractor. Shanahan and Gibson had a falling out in August, according to the senior Pentagon official with whom I spoke, and Shanahan reported the difficulty to Mattis—“who pulled a Dowdy.” Put simply, this official adds, when the “screaming and yelling” from the Pentagon’s senior bureaucracy reached a fever pitch at the end of the summer, Mattis and Shanahan decided that firing Gibson would be easier than defending him.

“I am not familiar with the details of what happened here and I wouldn’t want to speculate,” Todd Harrison, an official with the Center for Strategic and International Studies (and a well-known defense budget expert) says. “But I think that anyone in the new CMO position was signing on to the toughest job in Washington. It’s one thing to identify waste, and another to actually get rid of it. The truth is that waste is built into the Pentagon budget; if you eliminate it, you eliminate jobs.” A Pentagon official confirms this, but adds that “firing an official charged with making reforms for ‘lack of performance’ is laughable. Who are these guys trying to kid? The truth is that if Jay didn’t perform, he’d still have his job.”

The timing of Gibson’s firing, just weeks after the death of Senate Armed Services Committee heavyweight John McCain, also raises uncomfortable questions. “The minute Gibson was fired, McCain would have had Mattis, Shanahan, and Gibson on the carpet in his office, asking them what the hell they were doing,” a senior congressional staffer who monitors Pentagon personnel issues notes. “That’s not going to happen now.”

In fact, McCain had little love for Shanahan, telling aides that his appointment raised conflict of interest issues. McCain’s worries were aired when he grilled Shanahan on answers the Boeing executive gave to written questions posed to him by the committee in June 2017. It was a classic McCain scorcher: “The answers that you gave to the questions,” he told Shanahan, “whether intentionally or unintentionally, were almost condescending, and I’m not overjoyed that you came from one of the five corporations that receive 90 percent of taxpayers’ dollars. I have to have confidence that the fox is not going to be put back into the henhouse.” McCain was livid.

“Not a good beginning,” McCain told Shanahan. “Do not do that again, Mr. Shanahan, or I will not take your name up for a vote before this committee. Am I perfectly clear?” Shanahan nodded his agreement. “Very clear,” he said.

As it turns out, Shanahan’s appointment resulted from a series of contentious negotiations between Trump transition official Mira Ricardel and retired Adm. Kevin Sweeney, Mattis’s chief of staff. “There was no love loss between Mattis and Ricardel,” the senior Pentagon civilian with whom TAC spoke says. “So the SecDef told Sweeney to deal with her. Sweeney is a tough guy and Mira has sharp elbows, so this got nasty.”

The skirmishing got so bad that when Ricardel said she wanted to be the Pentagon’s undersecretary for policy, Mattis killed the idea, with Ricardel sidelined as the undersecretary of commerce for export administration. But Ricardel got her revenge: she not only successfully slotted Shanahan as Mattis’s number two, she was named as deputy to John Bolton, appointed by Trump to succeed H.R. McMaster as the administration’s national security advisor. “It’s the ultimate irony,” the senior Pentagon official says. “Jim Mattis ignored H.R. and he ends up with Mira Ricardel. Incredible.”

That Jay Gibson has been caught in the Mattis-Ricardel crossfire is an open secret at the Pentagon, where key officials speculate that Ricardel’s promotion of Shanahan has less to do with his commitment to Pentagon budget reform than to the fact that the two were close colleagues at Boeing, where Ricardel served for nine years (from 2006 to 2015) as vice president of strategic missile and defense systems. That is to say, Jay Gibson’s still unexplained firing has reinforced John McCain’s worries that the fox would end up guarding the henhouse.

“This is the Boeing mafia in all of its glory,” the senior Pentagon official says. “Anyone who comes in here [to the Pentagon] will always have Jay Gibson’s experience as a marker. You think anyone who’s willing to take on the bureaucracy is going to want that job? No way. Budget reform is dead, d-e-a-d dead. So much for draining the swamp.”

Mark Perry is the author ofThe Most Dangerous Man in Americaand The Pentagon’s Wars. Follow him on Twitter @markperrydc.