President Trump had a brief but emphatic reaction Thursday to the Senate’s 59-41 vote to nullify his national emergency declaration over the southern border — tweeting the single word “VETO!” moments after the embarrassing rebuke.

The GOP-led Senate’s vote — in which a dozen Republicans joined all its Democrats — was a stunning setback for the commander-in-chief in the upper chamber.

But Trump had repeatedly vowed to veto the resolution, which means that — barring successful court challenges by environmentalists, border land owners or others — he will be able to shuffle billions in Defense Department funds to begin construction of his long-promised wall.

“I’ll do a veto. It’s not going to be overturned. It’s a border security vote,” Trump told reporters during an unrelated White House event.

And there appeared to be no chance that lawmakers could muster enough votes to override the president’s thumbs down.

Trump wants to use his declaration to steer $3.6 billion more than Congress has approved for building border barriers.