Defense Secretary Mark Esper declared on Wednesday he opposes using military troops for law enforcement in containing current street protests, tamping down threats from President Donald Trump, who had warned states he was willing to send soldiers to "dominate" their streets.

WASHINGTON — Defense Secretary Mark Esper declared on Wednesday he opposes using military troops for law enforcement in containing current street protests, tamping down threats from President Donald Trump, who had warned states he was willing to send soldiers to "dominate" their streets.

Less than 48 hours after the president threatened to use the Insurrection Act to contain protests if governors were not able to get a handle on unrest, 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."

Yet Esper abruptly overturned an earlier Pentagon decision to send a couple hundred active-duty soldiers home from the Washington, D.C., region, amid growing tensions with the White House over the military response to the protests.

At Trump's encouragement, Esper had ordered about 1,300 Army personnel to military bases just outside the nation's capital. Defense officials said some of the troops were beginning to return to their home base Wednesday, but after Esper visited the White House following a press conference, plans changed, Army Secretary Ryan McCarthy told The Associated Press.

The reversal added to confusion over the president's threat to invoke the Insurrection Act for protests following the death of George Floyd 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. "But at this time he's relying on surging the streets with National Guard. It's worked with great effect."

At the same time, 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.

Trump argued that the massive show of force was responsible for protests in Washington and other cities turning more calm in recent days and repeated his criticism of governors who have not deployed their National Guard to the fullest.

"You have to have a dominant force," Trump told Fox New Radio on Wednesday. "We need law and order."

Underscoring his criticism, McEnany said, "The weak-kneed policies of New York stand in stark contrast to the law and order policies of this president."

She didn't dismiss reports of tension between Trump and Esper. Asked repeatedly if Trump still had confidence in his Pentagon chief, she said, "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."

Esper, in his Pentagon remarks, also strongly criticized the actions of the Minneapolis police for the incident last week that ignited the protests. Floyd, a black man being arrested, died after a white officer pressed his knee to Floyd's neck for several minutes. Esper called the act "murder" and "a horrible crime."

The defense secretary himself has come under fire from critics, including retired senior military officers, for having walked from the White House on Monday evening with Trump and others for a presidential photo opportunity in front of St. John's Episcopal Church, which had previously sustained damage from protesters.

Esper said that while he was aware they were heading to St. John's, he did not know what would happen there.

"I was not aware a photo op was happening," he said, adding that he also did not know that police had forcibly moved peaceful protesters in Lafayette Square to clear the way for Trump and his entourage.

The White House laid responsibility for Monday's events in Lafayette Park on Attorney General William Barr, saying he gave the order for law enforcement to clear out the protest before Trump's walk to the church ahead of Washington's 7 p.m. curfew. McEnany said the decision was made earlier Monday but had not been executed by the time Barr arrived in the park to survey the scene. He gave the order at that time.

McEnany said law enforcement conducted the operation with appropriate force, which included pepper spray and other chemical agents, and officers on horseback and batons clearing a crowd made up almost entirely of peaceful protesters.

Trump put a political spin on his criticism of states that have seen violence. He said, "You notice that all of these places that have problems, they're not run by Republicans. They're run by liberal Democrats."

The Defense Department has drafted contingency plans for deploying active-duty military if needed. Pentagon documents reviewed by The Associated Press show plans for soldiers from an Army division to protect the White House and other federal buildings if the security situation in the nation's capital were to deteriorate and the National Guard could not secure the facilities.

Though the crackdown on the Washington demonstrations was praised by some Trump supporters Tuesday, a handful of Republicans expressed concern that law enforcement officers risked violating the protesters' First Amendment rights.

The situation in Washington had escalated Monday, becoming a potent symbol of Trump's policing tactics and a physical manifestation of the rhetorical culture war he has stoked since before he was elected.

The clampdown followed a weekend of demonstrations outside the White House. 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 on Wednesday acknowledged he visited the bunker Friday but claimed he was only conducting an inspection as protests raged outside the White House gates.

Soldiers from the 82nd Airborne Division remain on standby at Joint Base Andrews in Maryland and Fort Belvoir in Virginia outside Washington.