Soldiers with Utah National Guard stand near a group of demonstrators that gathered to protest the death of George Floyd, Wednesday, June 3, 2020, near the White House in Washington. Floyd died after being restrained by Minneapolis police officers. (AP Photo/Evan Vucci)

WASHINGTON (AP) — President Donald Trump’s Pentagon chief shot down his idea of using troops to quell protests across the United States Wednesday, then reversed course on pulling part of the 82nd Airborne Division off standby in an extraordinary clash between the U.S. military and its commander in chief.

Both Trump and Defense Secretary Mark Esper also drew stinging, rare public criticism from Trump’s first defense secretary, Jim Mattis, in the most public pushback of Trump’s presidency from the men he put at the helm of the world’s most powerful military.

Mattis’ rebuke 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. The president 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 early Wednesday 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 in the United States “only in the most urgent and dire of situations.” He added, “We are not in one of those situations now.”

After his subsequent visit to the White House, the Pentagon abruptly overturned an earlier decision to send a couple hundred active-duty soldiers home from the Washington, D.C., region, a public sign of the growing tensions with the White House amid mounting criticism that the Pentagon was being politicized in response to the protests.

Former Secretary Mattis, a retired Marine general, lambasted both Trump and Esper in an essay in The Atlantic Wednesday 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. “Militarizing our response, as we witnessed in Washington, D.C., sets up a conflict — a false conflict — between the military and civilian society. ”