WASHINGTON — President Donald Trump promised to fight Democrats and Republicans in Washington, and, with his first-ever veto Friday, he did just that.

"Congress has the freedom to pass this resolution, and I have the duty to veto it," he said as he sent a measure that would have terminated his declaration of a national emergency — and the transfer of billions of dollars to build his promised border wall — right back to Capitol Hill.

The day before, a dozen Republican senators had joined with Democrats to pass the measure, an unusually large number of GOP defections from Trump's line.

While Trump played down the fracture Friday — "I didn't need the votes," he said — it showed that by engaging in a battle with Congress over the power of the purse, he has weakened institutional support for the wall, and for his authority, among Washington Republicans.

That is, even some Republicans who say they're for the wall are drawing the line at Trump declaring a national emergency and seizing spending decisions from Congress to do it.

But some Republicans say that may not be a bad thing for Trump as he heads into the 2020 election.

On the surface, it suggests he'll have a much tougher time winning budget battles with a Congress that is obviously increasingly inclined to assert its own prerogatives and restrain his. But Trump doesn't have any domestic policy agenda items that approach the political importance of the wall, and he wants to campaign against Washington again.

It's all the better if he can run, at least a little bit, against both parties, said Matt Schlapp, a Trump ally and chairman of the American Conservative Union.

"They gave him a gift," Schlapp said of Congress sending him the resolution. "The president is at his strongest when he is fighting and he is seen as credible when he is fighting members of his own party…especially when the principles are on his side."

Michael Steele, a former chairman of the Republican National Committee and frequent Trump critic, noted that the president said Friday he wasn't upset with Republicans who defected. Steele said he sensed a little bit of public theater playing out on both ends of Pennsylvania Avenue, the boulevard that runs between the White House and the Capitol.

"On the vote itself, there's a lot of high-minded drama about what these senators did," he said, noting that there was no chance of the president's veto being overridden and that most of the Republicans who defected aren't up for re-election next year. "I'm not convinced."

As for Trump, Steele added, "he loves the fight, he doesn't care who he's fighting, it doesn't matter if it's Republicans or Democrats ... for him, politically, it reaffirms for his base why they sent him to Washington."

Ultimately, the courts will decide whether Trump's spending gambit passes constitutional muster. For now, Democrats and some Republicans argue that his decision to grab money from existing projects and rededicate it to build the wall is a violation of Congress' constitutional primacy in spending matters.

"The House and Senate resoundingly rejected the President's lawless power grab, yet the president has chosen to continue to defy the Constitution, the Congress and the will of the American people," Speaker Nancy Pelosi, D-Calif., said in a statement released after the veto.

Some Republican critics of the president's methods, including Sen. Mitt Romney, R-Utah, have raised constitutional concerns, while others have simply worried that a future Democratic president would use the precedent set by Trump to spend money on pet projects not approved by Congress.

Rachel Bovard, the policy director at the Conservative Policy Institute and a former aide to Sen. Rand Paul, R-Ky., who cited constitutional concerns in voting against the president Thursday, said that the emergency declaration doesn't violate the separation of powers principle.

"The Constitution is not in crisis. The border is," Bovard said in a text exchange with NBC. "The president's declaration follows the law that Congress passed. They've appropriated money and authorized a law that allows this wall to be built. If Congress wants to change the law that disallows future presidents from taking this action, they are well within their rights to do so."

To Bovard, the question is a political one, not a legal one.

"Trump is using the power that Congress gave him to secure the border — which is more than Congress is apparently willing to do," she said. "So what's truly at stake is whether or not Republicans are going to be united on border security going into 2020."

The movement of power toward the executive branch, and away from Congress, is a long-running trend, said Mack McLarty, who served as chief of staff to President Bill Clinton.

While he sees Trump's use of executive power in this instance — including the veto and the original decision to shift money around — as "unique" because it "interferes with Congress' rights ...in terms of appropriations funds," he said Friday's action makes sense in the context of the emphasis Trump has put on the wall.

"This is a priority issue for him, and this is why he's using the veto pen," McLarty said.