President Donald Trump was talked out of firing Defense Secretary Mark Esper after he publicly broke with the president on his proposed solution of stopping nationwide protests, some of which have coincided with riots and looting.

The Wall Street Journal reported Tuesday that Trump consulted with several advisors about his intention to fire Esper, but changed his mind after talking with White House chief of staff Mark Meadows, Secretary of State Mike Pompeo and Sens. Tom Cotton (R-Arkansas) and James Inhofe (R-Oklahoma).

Esper went against Trump during a Pentagon press briefing last week by saying he did not support invoking the Insurrection Act, a law that would allow the president to deploy active-duty forces against civilians protesting police brutality.

CORONAVIRUS FAQ: WIKI OF MOST FREQUENTLY ASKED QUESTIONS 

“I say this not only as secretary of Defense, but also as a former soldier and a former member of the National Guard, the option to use active-duty forces in a law enforcement role should only be used as a matter of last resort, and only in the most urgent and dire situations. We are not in one of those situations now,” Esper said. “I do not support invoking the Insurrection Act.”

Two days prior to Esper’s comments, Trump said he was taking “swift and decisive action to protect our great capital, Washington, D.C.”

“As we speak, I am dispatching thousands and thousands of heavily armed soldiers, military personnel and law enforcement officers to stop the rioting, looting, vandalism, assaults and the wanton destruction of property,” Trump said.

The protests which stemmed from the death of George Floyd, a black man killed by a Minneapolis police officer who has since been charged, have been largely peaceful. However, in some cities like Minneapolis and New York, protests have led to vandalism and looting, though many protesters say the looters were not a part of the original protest.

White House press secretary Kayleigh McEnany said Tuesday that Trump has the “sole authority” to invoke the Insurrection Act should he choose to do so.

“As of right now, Secretary Esper is still Secretary Esper, and should the president lose faith, we will all learn about that in the future,” McEnany said.

A day after Trump’s initial remarks, Esper deployed 1,600 active-duty Army soldiers to the Washington area. Shortly after their arrival, Esper said he was going to send them back.

However, following a meeting at the White House and reports that Trump was unhappy with Esper, an Army spokesperson told NBC that Esper had changed his mind once again and would not be sending the troops back.

The next day, Esper officially reversed his decision and ordered several hundred troops to return home to Fort Bragg in North Carolina.