Washington (AFP) - A combative Donald Trump threatened Friday to veto a spending deal clinched in a dead-of-night compromise in Congress, in a dramatic U-turn by the president that raises the fresh specter of a government shutdown.
The president brandished the threat in a tweet after the Senate passed the $1.3 trillion spending bill, 65-32, under the pressure of a midnight Friday deadline to fund the government, or shut it down.
It caps yet another week of high drama at the White House where the mercurial former reality TV star replaced his national security advisor, launched a new trade fight with China, and needled investigators probing Russia election meddling.
Trump's White House had given its blessing to the compromise spending deal with Democrats, but by Friday morning, with the clock still ticking, the president had second thoughts.
Lashing out on Twitter, he complained that the bill failed to fully fund his border wall with Mexico, or settle the fate of hundreds of thousands of immigrants brought to the country illegally as children.
"I am considering a VETO of the Omnibus Spending Bill based on the fact that the 800,000 plus DACA recipients have been totally abandoned by the Democrats (not even mentioned in Bill) and the BORDER WALL, which is desperately needed for our National Defense, is not fully funded," he said.
The bill provided $1.6 billion for border security and construction or repair of nearly 100 miles (160 kilometers) of border fencing, but that was far less than Trump had been seeking.
It also set aside the issue of the so-called "Dreamers," who are in legal limbo following the Trump administration's repeal of Deferred Action on Childhood Arrivals (DACA), a policy instituted by former president Barack Obama that protected them from deportation.
DACA expired on March 5, but the issue is being fought in the courts. Attempts at a legislative fix collapsed in a previous round of negotiations to avert a government shutdown.
In a Congress riven by partisan feuding, passage early Friday of the massive bill to fund the US government through September was considered a rare achievement.
The centerpiece was a big increase in US defense spending to $700 billion dollars, up $61 billion, and a 10 percent hike in domestic spending, which would rise to $591 billion.
But it came with last minute fights in a tumultuous late night session, after one of Trump's fellow Republicans, Senator Rand Paul, refused to allow a quick vote, only to relent.
Five times since October, lawmakers have had to pass stopgap funding legislation to keep the government's lights on. Twice this year the government was allowed to slip into shutdown.
A third lapse would be deeply embarrassing for a Republican-controlled Congress facing midterm elections in November.