From housing undocumented migrants to scrapping joint exercises with South Korea or setting up a new Space Force -- US Defense Secretary Jim Mattis, one-time favorite of Donald Trump, now finds himself reduced to carrying out presidential orders despite his disapproval.
US media say that the retired Marine general has been demoted in Washington's power circles by the arrival of former CIA chief Mike Pompeo as secretary of state, replacing the far-less active Rex Tillerson, and by the appointment of the hawkish John Bolton as national security adviser.
Trump has grown distant from Mattis because his defense chief "slow-walks his policy directives," administration sources told NBC News.
James Clapper, the former US intelligence chief, told CNN that Mattis may quit if the president sidelines him.
"I think if it reached the point where he himself felt that he was just ineffective and had no voice, no influence, I don't know how long he would linger," Clapper said.
Mattis -- one of the few voices still considered to be moderate in the Trump cabinet -- has faced a growing series of headaches in recent weeks.
Leaving aside Trump's withdrawal from the Iran nuclear accord and the imposition of tariffs on steel and aluminum, both of which Mattis opposed, the former general has been caught off guard several times by snap decisions on subjects where he would normally be consulted.
The Pentagon was taken by surprise when the president announced in early April, on the sidelines of a White House meeting with Baltic leaders, that he was going to deploy the National Guard on the border with Mexico "until we can have a wall and proper security."
On June 12, Trump announced a halt to joint maneuvers between US and South Korean forces after a historic meeting with North Korean leader Kim Jong Un in Singapore, calling the military exercises with the US ally "provocative" and "very expensive."
It took the Pentagon several hours to confirm the decision, eventually issuing a cautious statement that it "welcomes the positive news coming out of the summit and fully supports the ongoing, diplomatically-led efforts with North Korea."
The maneuvers were only officially cancelled on June 18, and two weeks after the summit, the Pentagon has still not made public the cost of the exercises, which might have backed up Trump's comments.
Last week, Trump ordered the Pentagon to create a sixth branch of the military, a Space Force that would be independent of the Army and Air Force, something Mattis has publicly opposed on several occasions.
Mattis refrained from any immediate comment on the new force, but his spokesman Dana White noted, without enthusiasm, that the process would take a long time. "Working with Congress, this will be a deliberate process with a great deal of input from multiple stakeholders," White said.
And in the past week, the Pentagon has been dragged into the quagmire surrounding Trump's illegal immigration policy across the Mexican border, with orders to prepare to house migrant families on military bases, after a backlash against the practice of separating children from their parents.
Mattis, who had carefully avoided taking questions from the press since the start of the policy, had little choice but to comply: 20,000 unaccompanied migrant children will now be housed on military bases, two of which have already been identified in Texas.
"While I recognize the political aspect of it, for us it is a logistic support effort," he said on Monday.