Having sent officers from the Department of Homeland Security to Portland, Ore., President Donald Trump is now saying that he will send more federal agents to other U.S. cities to fight crime. His actions, already heavily criticized by elected officials in Oregon, raise serious constitutional questions. How and when may the president deploy armed federal officers across the country? What are the limits? And, what if anything, can states or citizens do about it?

The president, as head of the executive branch, has the constitutional duty and authority to "take care" that the laws of the United States are faithfully executed. This includes sending federal officers to protect federal property and enforce federal law.

Good examples aren't hard to find. When President Barack Obama's administration sent federal officials to confront Cliven Bundy in 2014, that was perfectly lawful and constitutional. When a citizen claims that the federal government does not own federal land, it can be appropriate for the government to demonstrate that it in fact does own that land.

Similarly, although of much greater moral significance, President Dwight D. Eisenhower sent the 101st Airborne to enforce federal law and the Constitution by integrating the Little Rock schools in 1957. This was an extraordinary act, but entirely legitimate in light of the state of Arkansas's open resistance to the authority of the U.S. Supreme Court.

Most famously, President Abraham Lincoln sent federal troops to suppress the secession of the Confederate states based on the argument that he must enforce federal law and protect federal property, including Fort Sumter.

Yet these executive rights and responsibilities are extremely different from what Trump is presently doing. In Portland, it appears that no federal property has been jeopardized by any failure of state or local police. As for the enforcement of federal law, that is restricted to crimes affecting state commerce and specifically enumerated in federal law or in the Constitution. That does not include ordinary criminal investigation or the policing of the streets. It certainly does not include the exercise of protected constitutional rights like peaceful protest.

It follows that it is unconstitutional and unlawful for DHS officers to enforce nonfederal law unless they are deputized by state or local officials — not the president — to do so. And Portland officials, far from making the DHS officers into deputies, have instead publicly expressed their outrage at the officers' presence and demanded their removal.

In an attempt to push back, Oregon Attorney General Ellen Rosenblum announced Friday that she planned to file a lawsuit in federal court, and on Monday, she asked for a temporary restraining order while that lawsuit goes forward. Read closely, the lawsuit does not directly challenge Trump's authority to send the DHS officers to Portland. That's because the AG understands that the president may send the officers to protect federal property and enforce federal law. Rather, the lawsuit alleges that DHS officers, unidentified because they were not wearing name tags, violated the federal constitutional rights of Oregon citizens by arresting them and detaining them without cause while they were exercising their constitutional right to freedom of speech and movement.

On its own, the lawsuit is unlikely to have much of a deterrent effect on Trump. A possible next step would be for the state to file a fresh lawsuit challenging not only the officers' conduct but their very presence to the extent that they are not protecting federal property or enforcing federal law. A federal court could conceivably issue a declaratory judgment restricting the DHS officers' function to its appropriate constitutional limits. There would be a question of whether the state had standing to challenge the officers' presence; to address that concern, the state would presumably allege that its citizens were being hampered in the exercise of their rights and that the state was obligated to expend resources on monitoring the DHS officers.

Nonetheless, any lawsuit will be hard to win as long as the Trump administration can state some legitimate basis for the presence of the DHS officers. It might make a difference that Trump has been talking openly about these federal agents as if they were ordinary crime fighters, a function clearly outside their constitutional authority, or his. Some lower federal courts have on occasion treated Trump's pronouncements as indicating his intent for purposes of constitutional analysis. However, it is also very possible that courts would want to avoid getting into the business of monitoring federal officials as they do their jobs across the nation.

The upshot of all this is that Trump has once again found a soft spot in the system of constitutional order that he can exploit for what he hopes will be political gain. That said, the effort could potentially backfire even with his hard-line supporters. Federalism is traditionally a conservative standpoint in U.S. politics. At least some Trump voters have liberation instincts and will not like the idea of unidentified federal officers roaming around and making arrests. Those libertarians have a constitutional point.

The challenge now is to see if the courts can help draw a line that protects the Constitution while preserving appropriate executive discretion for future, more normal presidents.

Noah Feldman is a Bloomberg Opinion columnist and host of the podcast "Deep Background." He is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His books include "The Three Lives of James Madison: Genius, Partisan, President."