The U.S. military has been hindered by an overbearing and inexperienced White House under President Barack Obama, according to each of his three former defense secretaries, causing the Pentagon to struggle to carry out operations and make decisions.

"It was the operational micromanagement that drove me nuts, of White House and [National Security Council] staffers calling senior commanders out in the field and asking them questions, of second-guessing commanders," former Defense Secretary Robert Gates told Bret Baier in a new Fox News special called "Rising Threats, Shrinking Military."

Baier posted clips from the program Wednesday that did not make it to the final cut.

Gates was a holdover from the George W. Bush administration, and Obama kept him on as Pentagon chief. He described how, when he served in the White House, he would have "had [his] head handed to [him], probably personally by the president," if he tried to call a field commander while circumventing senior Pentagon officials.

"I told the combatant commanders and field commanders … if you get a call from some White House or National Security Council staffer, you tell them to call me instead, and then tell them, oh, by the way, go to hell," Gates said, smiling. "And that’s directly from the secretary of defense."

Gates’ successor, Leon Panetta, took office in July 2011 and told Baier he had similar concerns with the Obama administration, despite being a long-time Democrat who served as a California congressman for many years and as Bill Clinton’s chief of staff.

Panetta complained that the president’s national security council staff had gotten so large and overbearing in recent years, creating massive inefficiency with creating foreign and defense policy.

"What that does is it undermines the very process that a president needs in order to get the best discussion and information possible to be able to make the right decisions," Panetta explained.

The former defense secretary then went beyond the White House staff and expressed concern that the president’s policies have made the United States appear weak on the world stage.

"I think what I’ve seen in these last four years is almost this cautiousness and overcorrection, which makes it appear that the United States is hesitant to take action," Panetta said. "And that sends, I think, a message of weakness."

Chuck Hagel, who replaced Panetta in February 2013, agreed that the size and role of the White House staff during the Obama presidency made it difficult to accomplish tasks and be productive.

"There were always too many meetings and always too many people in the room and too many people talking," Hagel described. "Especially young, smart 35-year-old PhDs [who] love to talk because that’s the way you let everybody know how smart you are. So there were a lot of reasons those meetings descended into… nonsense and the hard time we had making a decision."

Hagel focused especially on the inexperience of the president himself and his staff, describing how Obama is "one of the youngest presidents we’ve ever had, one of the most inexperienced presidents we’ve ever had. He has a staff around him that’s very inexperienced. I don’t think there’s one veteran on his senior staff at the White House. I don’t believe there’s one business person. I don’t believe there’s one person who’s ever run anything. Other than Vice President Biden, none of them have ever been elected to anything."

Hagel added that he is not sure if Obama or his staff ever understood "the tremendous responsibility the United States has… to lead."

Gates said he is concerned the president is suspicious of the military. He also said Obama was told by White House personnel during the debate over the war in Afghanistan that the Pentagon was trying to "box him in," "trap him," and "bully him," which Gates said was never true.

"But there were clearly a number of people at the White House who believed that," Gates said.

Ash Carter took over as Obama’s fourth defense secretary in February 2015 and continues to serve today.