WASHINGTON — President Trump plans to deploy federal law enforcement to Chicago and threatened on Monday to send agents to other major cities — all controlled by Democrats.Governors and other officials reacted angrily to the president’s move, calling it an election-year ploy as they squared off over crime, civil liberties and local control that has spread from Portland, Ore., across the country.With camouflage-clad agents already sweeping through the streets of Portland, more units were poised to head to Chicago, and Mr. Trump suggested that he would follow suit in New York, Philadelphia, Detroit and other urban centers. Governors and other officials compared his actions to authoritarianism and vowed to pursue legislation or lawsuits to stop him.The president cast the confrontation in overtly political terms as he seeks an issue that would gain traction with voters at a time when many of his own supporters have soured on his leadership amid a deadly pandemic and economic collapse. Trailing badly in the polls with just over 100 days until the election in November, Mr. Trump assailed the “liberal Democrats” running American cities and tied the issue to his presumptive fall opponent, former Vice President Joseph R. Biden Jr.“I’m going to do something — that, I can tell you,” Mr. Trump told reporters in the Oval Office. “Because we’re not going to let New York and Chicago and Philadelphia and Detroit and Baltimore and all of these — Oakland is a mess. We’re not going to let this happen in our country. All run by liberal Democrats.”The president portrayed the nation’s cities as out of control. “Look at what’s going on — all run by Democrats, all run by very liberal Democrats. All run, really, by radical left,” Mr. Trump said. He added: “If Biden got in, that would be true for the country. The whole country would go to hell. And we’re not going to let it go to hell.”Democrats said the president was the one out of control. Senator Jeff Merkley of Oregon said he would introduce legislation to limit the role of federal agents in cities like Portland. “This isn’t just an Oregon crisis,” he said. “It’s an American crisis. We need to stop Trump before this spreads.”He added, “We won’t let these authoritarian tactics stand.”Federal agents in Portland have snatched protesters off the streets and thrown them into unmarked vehicles without explaining why they were being detained or arrested, according to some of those who have been seized. Oregon’s governor, Kate Brown, has called it “a blatant abuse of power,” and the city’s mayor, Ted Wheeler, has called it “an attack on our democracy.” The state attorney general has filed a lawsuit seeking a restraining order against the federal agents for what she called unlawful tactics.The Trump administration now plans to deploy about 150 Homeland Security Investigations special agents to Chicago in the coming days, according to an official directly involved in the operations. The special agents, known for conducting long-term investigations into serious crimes like human trafficking and terrorism, are expected to be in the city for at least 60 days to help combat violence and would be under the direction of the Justice Department.Few are denying the city has a violent crime problem. Sixty-three people were shot in Chicago over the past weekend, 12 of them fatally. The White House referred questions to the Department of Homeland Security, which declined to comment, as did the Justice Department.The Department of Homeland Security has put about 2,000 officials from Customs and Border Protection, Immigration and Customs Enforcement, the Transportation Security Administration and the Coast Guard on standby to be quickly deployed to cities. At least 200 members of “rapid deployment teams” were sent to Washington, D.C., Portland, Pennsylvania and Seattle, the agency said this month. Many tactical agents from those teams from Customs and Border Protection and ICE are now in Portland.Some cities have seen increased levels of crime since the protests over George Floyd’s death while in police custody in Minneapolis, but no president in modern times has threatened to send in federal law enforcement over local opposition.In contrast to the president’s claims, many major cities remain safer than they were decades ago, despite the recent uptick in crime. Some protesters, including in Portland, have targeted federal property and officers with rocks and fireworks, and some protests weeks ago resulted in damage to businesses and looting. But most of the demonstrations throughout the United States have largely been peaceful.Mayor Lori Lightfoot of Chicago made clear on Monday that the federal agents would be no more welcome in her city than they have been in Portland. “We don’t need federal agents without any insignia taking people off the street and holding them, I think, unlawfully,” she said at a morning news conference before reports of the deployment were confirmed. “That’s not what we need.”In a four-page letter to Mr. Trump sent later in the day and obtained by The New York Times, Ms. Lightfoot said if the president really wanted to help Chicago, he should enact gun control, do more to curb the coronavirus and invest in community programs.“Any other form of militarized assistance within our borders that would not be within our control or within the direct command of the Chicago Police Department would spell disaster,” she wrote.Trump administration officials said the deployment to Chicago was separate from the operation in Portland, which ostensibly was to protect the federal courthouse there.But the Homeland Security Investigations agents have broad authority to enforce federal laws in cities, and the Trump administration deployed them this year to so-called sanctuary cities in an enhanced arrest campaign against undocumented immigrants. The administration has also previously deployed federal officials to combat crime in Chicago, including agents from the Bureau of Alcohol, Tobacco, Firearms and Explosives.The Department of Homeland Security asserted that it was acting within the law, pointing to 40 U.S. Code 1315. Chad F. Wolf, the department’s acting secretary, can deputize officers in any department agency, like ICE, Customs and Border Protection or the Secret Service, “as officers and agents for duty in connection with the protection of property owned or occupied by the federal government and persons on the property,” according to the law.But the federal agents would not be limited to guarding federal property. Under the law, the agents could also conduct investigations of crimes committed against a federal property or federal officer throughout the city, Department of Homeland Security officials have said.Carrie Cordero, a senior fellow for the Center for a New American Security, said that the federal statute did provide flexibility to tap members of various agencies to assist in guarding federal property, but that it was never intended to send border agents trained to investigate a drug cartel to crack down on protesters in the streets.“What’s happening is the administration is using D.H.S. to perform basically a federal policing function, which in my view is unconstitutional and is certainly not what Congress intended when it created the department,” she said.Stephen I. Vladeck, a law professor at the University of Texas at Austin, said it was not clear how federal agents could occupy the streets of a city that is 99 percent not federal property. “It’s of course the prerogative of the federal government to enforce federal law and protect federal property,” Mr. Vladeck said. “It is not the job of the federal government to be a general police force for all crimes.”Governors, mayors and other officials from the cities that Mr. Trump named on Monday quickly rejected the uninvited intervention of federal agents.“It is deeply disturbing that President Trump is once again choosing to spread hateful rhetoric and attempting to suppress the voices of those he doesn’t agree with,” said Gov. Gretchen Whitmer of Michigan.John Roach, a spokesman for Mayor Mike Duggan of Detroit, said the city had not suffered through the problems that others have after Mr. Floyd’s death. “Detroit is one of the few large cities in the country that has experienced no fires, no stores looted and never requested the National Guard during the protests,” he said. “Not sure where the president is getting his information.”Asked on Monday about whether he had heard the president’s mention of Oakland, Gov. Gavin Newsom of California — not known for his brevity — responded curtly: “No, and we’d reject it.”In Philadelphia, the district attorney likened the clash to the fight against fascism in World War II and threatened to criminally charge federal agents sent to his city if they exceeded their authority. “Anyone, including federal law enforcement, who unlawfully assaults and kidnaps people will face criminal charges from my office,” said the district attorney, Larry Krasner. “At trial, they will face a Philadelphia jury.”Mr. Wolf dismissed the complaints, making clear that he had no intention to pull back regardless of the objections. “I don’t need invitations by the state, state mayors, or state governors to do our job,” Mr. Wolf said on Fox News. “We’re going to do that, whether they like us there or not.”The dispatch of federal agents to cities has become a new front for a president seeking to regain political momentum heading into a fall campaign season. Eager to recast protests against racial injustice after the George Floyd killing into an us-versus-them battle for law and order, Mr. Trump in recent days has repeatedly blamed Democrats for countenancing violence and failing to stand up to crime.Speaking with reporters in the Oval Office, Mr. Trump said federal agents had “done a fantastic job” in Portland, which was “totally out of control,” and he assailed the governor and other officials there for not welcoming the help. “These are anarchists,” he said. “And the politicians out there, yes, they’re weak, but they’re afraid of these people. They’re actually afraid of these people. And that’s why they say, ‘We don’t want the federal government helping.’”He said other cities were in similar need of federal intervention, naming some of the nation’s largest urban centers. “How about Chicago?” he said on Monday. “I read the numbers where many people killed over the weekend. We’re looking at Chicago, too. We’re looking at New York.”The policy closely mirrored the politics. At the same time the president was weighing the use of federal power, his campaign posted an advertisement online showing an elderly lady in her home at night trying to call 911 during a break-in only to be put on hold because the police had been defunded. “You won’t be safe in Joe Biden’s America,” the ad said.Peter Baker and Zolan Kanno-Youngs reported from Washington, and Monica Davey from Chicago. Jill Cowan contributed reporting from Los Angeles.