The Trump administration on Monday floated the idea of taking control of the D.C. police force, ratcheting up tensions between the White House and the District over how much force should be used to quell protests that have sometimes turned volatile.

The unprecedented request sent District leaders scrambling to head off what they regarded as tantamount to a government overthrow, and to the legal books to come up with a way to push back.

In the end, the federal government did not follow through but did invoke its broad powers over the District to send the National Guard onto the streets, along with military helicopters that flew over the city and menaced demonstrators, which the police chief said he “did not find helpful.”

Mayor Muriel E. Bowser’s administration on Tuesday confirmed the overture from the Trump administration, as the city entered a fifth day of demonstrations over the killing of George Floyd in Minneapolis. The District of Columbia is a federal enclave governed by a mayor and city council, but the federal law granting self-governance allows the president to take control of local police officers in certain emergency situations.

Bowser (D), when asked generally about the provision granting the federal government such authority, said she would regard its use as “an affront to our limited home rule and to the safety of the District of Columbia.”

“I think you heard the president yesterday, that he wanted a show of force in D.C. . . . We all heard the ominous warning,” the mayor said in an apparent reference to President Trump’s statements about sending a federal force into the District and telling local leaders they should “dominate” unruly protests.

A takeover of one of the largest and most high-profile police agencies in the nation would have been yet another blow to a city fighting for statehood, forcing it to surrender control of all or part of a 4,000-member armed force to federal officials who do not answer to District residents and whose policies and practices differ from those of local leaders.

Bowser has repeatedly said she welcomes peaceful demonstrations and shares outrage over Floyd’s death. The mayor also this week expressed concern about outside police forces that are not accountable to her operating in the District.

Trump had signaled that he was prepared to take some kind of military action in cities roiled by protests over Floyd’s death. Although many of the demonstrations in Washington were peaceful, there were some instances of looting, property destruction, and rock and bricks thrown at police, who have made more than 300 arrests over three days.

Trump had sharply criticized the response by individual cities and states, accusing some governors of being “weak” and telling them they should “dominate” unruly protests.

D.C. Police Chief Peter Newsham, a nearly 30-year veteran of the force, declined to say what he would have done had he been forced to answer to Trump.

“We are living in unprecedented times,” the chief said. “I work for the mayor of the District of Columbia. . . . I feel comfortable that I’m doing the best job I can possibly do to protect this city.”

D.C. Council member Charles Allen (D-Ward 6) called the White House proposal “nothing short of despicable” and said that had the president followed through, “I would certainly hope that the D.C. police officers would object and stand down.”

The council member is one of at least four lawmakers who have urged the mayor to do more to stymie federal intervention in dealing with the unrest, including by lifting or relaxing a curfew she imposed this week.

D.C. Council Chairman Phil Mendelson (D) said federalizing the D.C. force would “make things worse” on the streets. “My understanding is the crowd is larger tonight than it was last night, and that’s all about Donald Trump,” he said. “He’s provoking the protesters. He’s provoking America.”

Officials said staff at the White House and at the Wilson Building, which is the District’s city hall, began discussing a possible takeover before federal agencies, including the U.S. Park Police and the National Guard, forcefully cleared Lafayette Square on Monday evening.

The move, which played out before the president walked to a nearby historic church, was quickly criticized by Bowser. The White House offered conflicting reasons for the response, seeking to separate the move from Trump’s visit to the church.

Bowser, at a Tuesday news conference, did not directly address specifics of what she described as a “flurry of conversations” with officials in the White House and Justice Department over Trump’s desire to deploy the National Guard, military troops and federal riot police to the District.

She said she “absolutely” pushed back against those proposals.

“We don’t want armed military, we don’t want any of those things on D.C. streets,” the mayor said.

The White House did not dispute the mayor’s account.

“We’re glad to see that after two nights of inaction, riots and looting against innocent civilians — the president’s actions restored order in the nation’s capital,” said a White House official, who like others spoke on the condition of anonymity to discuss internal conversations.

A second senior official said Trump was fixated on the rioting and raucous protests in D.C. streets and instructed his team to talk to city officials and the D.C. National Guard about how to stop it.

A third White House official said Trump has expressed a dim opinion of Bowser in recent days and believed the protests in the streets of D.C. reflected poorly on him. He was determined to show, this official said, that the District would get under control as he mocked other cities for not being under control.

Because of the city’s unique status as a federal district, the D.C. National Guard is appointed by the president and can be deployed without the consent of D.C. officials. In states, that power rests with the governor.

The 1973 Home Rule Act, which granted the District limited autonomous authority, contains provisions for the “emergency control of police” via a federal takeover of the D.C. police.

To invoke that act, the president would have to determine that “special conditions of an emergency nature exist which require the use of the Metropolitan Police force for federal purposes.” The takeover may last up to 48 hours and may be extended with approval of the members of Congress that oversee District affairs, the act states.

Jonathan Turley, a George Washington University law professor who has researched the District’s home rule provisions, criticized the language as overly broad and said it gives the federal government wide latitude in defining an “emergency.”

“The courts find it very difficult to add qualifications to such sweeping language,” Turley said, adding that civil unrest could certainly qualify as an “emergency.”

“There is no more intrusive or insulting act,” Turley said.

D.C. Attorney General Karl A. Racine (D) said he believes the term “emergency” would be interpreted narrowly and would mean the city had fallen into “a state of lawlessness that would require an extraordinary” supplementary police force. He said the looting and rock-throwing going on now is more criminal and “would not justify this extreme measure.”

Though the White House did not move forward, Trump still put a highly visible federal presence on the streets. Through the night and early-morning hours, city streets were filled with police vehicles from many federal law enforcement agencies — some of which regularly work with D.C. police and others that are rarely seen on patrol.

Newsham said federal officers answered to the U.S. attorney general, while his officers reported to him. He said the National Guard, whose members city leaders believe were unarmed, partnered with D.C. police. Humvees cruised the streets and the military set up checkpoints.

The federal presence was clear. Attorney General William P. Barr came to 16th Street NW, and Army Gen. Mark A. Milley, chairman of the Joint Chiefs of Staff, toured the streets in military fatigues. The military helicopter buzzed the city, and at least once hovered at treetop level, scattering branches and creating a downdraft — a technique that can be used to scatter people on the ground.

In a statement Tuesday, Barr said the federal government would pour “greater law enforcement resources and support in the region tonight.” He also praised D.C. police ands said the District is “well served by this exceptional force.”

Matt Zapotosky contributed to this report.