Mattis' rebuke on Wednesday followed Trump's threats to use the military to "dominate" the streets where Americans are demonstrating following the death of George Floyd, a black man who died when a white police officer pressed his knee into his neck for several minutes. Trump had urged governors to call out the National Guard to contain protests that turned violent and warned that he could send in active duty military forces if they did not.
Esper angered Trump when he said he opposed using military troops for law enforcement, seemingly taking the teeth out of the president's threat to use the Insurrection Act. Esper said the 1807 law should be invoked "only in the most urgent and dire of situations". He added, "We are not in one of those situations now."
After Esper's visit to the White House, the Pentagon abruptly overturned an earlier decision to send a couple hundred active-duty soldiers home from the Washington, DC, region, a public sign of the growing tensions with the White House. That reversal was reversed on Thursday.
Former Secretary Mattis, a retired Marine general, lambasted both Trump and Esper in an essay in The Atlantic for their consideration of using the active-duty military in law enforcement - and for the use of the National Guard in clearing out a largely peaceful protest near the White House on Monday evening.
"We must reject any thinking of our cities as a 'battlespace' that our uniformed military is called upon to 'dominate'," Mattis wrote, referencing quotes by Esper and Trump respectively. "Militarising our response, as we witnessed in Washington, DC, sets up a conflict - a false conflict - between the military and civilian society. "
Trump responded on Twitter by calling Mattis "the world's most overrated General", adding: "I didn't like his 'leadership' style or much else about him, and many others agree, Glad he is gone!"
Yet another former military leader, retired Marine Corps four-star general Allen, said that events on Monday, the day Trump walked to the church, "may well signal the beginning of the end of the American experiment".
Allen, president of the liberal-leaning Brookings Institution, contrasted the routing of the protesters in Lafayette Park with remarks by Floyd's brother, Terrence Floyd, who denounced looting that he said tarnishes his brother's memory.
Writing in Foreign Policy, Allen urged people to make their votes in November for the future of America's democracy. "It will have to come from the bottom up. For at the White House, there is no one home," he wrote.
Then, on Thursday, Alaska Senator Murkowski said she was "really thankful" for Mattis' comments. She said she thought his "words were true and honest and necessary and overdue".
"I felt like perhaps we're getting to the point where we can be more honest with the concerns that we might hold internally, and have the courage of our own convictions to speak up," she said. Asked if she could support Trump for re-election, she said, "I am struggling with it."
Days ago, Esper had ordered about 1300 Army personnel to military bases outside the nation's capital as Trump weighed whether to invoke the Insurrection Act and send active-duty troops into the city, where the scene of large protests that devolved into violence and looting over the weekend. But after a night of calm enforced by a large deployment of National Guard troops and heavily armed federal law enforcement agents, defense officials said the troops would begin returning to their home base.
Army Secretary Ryan McCarthy told The Associated Press that the decision was reversed after Esper's visit to the White House. The White House didn't respond to request for comment on whether Trump ordered the change.
The shift added to confusion over the president's threat to invoke the Insurrection Act for protests following Floyd's death in Minneapolis. White House officials had indicated even before Esper's comments that Trump was backing away from invoking the act, though officials said Trump was upset that Esper's statement conveyed "weakness".
Press secretary Kayleigh McEnany said the president was still willing to deploy federal troops despite Esper's comments: "If needed, he will use it," she told reporters.
Meanwhile, the president was taking credit for the deployment of federal and other law enforcement officers to the nation's capital, saying it offered a model to states on how to stop violence accompanying some protests nationwide.
On Wednesday evening, troops and others were out in force in Washington. A Defence official said at least 2200 National Guard members would be on the streets. Helmeted forces ringed Lafayette Park across from the White House. Military vehicles were parked at intersections, blocking access.
Mattis, in his essay Wednesday, called the scene an "abuse of executive authority". The retired general quit the Trump administration in December 2018 after months of conflict with the president as Trump announced he was unilaterally withdrawing American troops from Syria.
Though the crackdown on the Washington demonstrations was praised by some Trump supporters, a handful of Republicans expressed concern that law enforcement officers risked violating the protesters' First Amendment rights.
Trump had been furious about images juxtaposing fires set in the park outside the executive mansion with a darkened White House in the background, according to current and former campaign and administration officials. He was also angry about the news coverage revealing he had gone to the secure White House bunker during Friday's protests.
Trump acknowledged he visited the bunker but claimed he was only conducting an inspection as protests raged outside.