Speaker Nancy Pelosi said as much as she warned Republicans of the dangers of the president’s plan.

“I’m not advocating for any president doing an end run around Congress,” she said. “I’m just saying that the Republicans should have some dismay about the door that they are opening, the threshold they are crossing.”

Ms. Pelosi has a point. In the ever escalating partisan fights in Congress, the party that considers itself wronged by raw exercise of power typically seeks quick revenge when it has the opportunity to do so. Cases in point: the decision by Democrats in 2013 to eliminate the 60-vote threshold for filibusters on most nominations, the Republican blockade in 2016 against Judge Merrick B. Garland’s nomination to the Supreme Court and the elimination in 2017 by Republicans of the 60-vote threshold on Supreme Court nominations.

In the Republican case against the Obama administration’s spending, a lawsuit initiated by John A. Boehner, the speaker at the time, claimed that the executive branch was spending more than $130 billion in subsidies under the Affordable Care Act that Congress had never agreed to spend. In a surprising decision in 2015, Judge Rosemary M. Collyer of Federal District Court in Washington sided with Republicans and said that if the House could not sue to protect its appropriations power, it was in big trouble.

“The House of Representatives as an institution would suffer a concrete, particularized injury if the executive were able to draw funds from the Treasury without a valid appropriation,” she wrote in her ruling. The case was later essentially made moot when Mr. Trump took over from Mr. Obama, but the ruling against the White House stood.

The border wall case is somewhat different because the White House is using its declaration of an emergency as a justification for steering federal dollars to the wall against the wishes of Congress. But Democrats and some Republicans insist there is no emergency in the sense that the law was intended to cover. They say such action by the president would be an unmistakable defiance of Congress, which made its views evident in the spending legislation that did not provide the authority for the president to build the wall he wants.