President Donald Trump signed a $1.3 trillion spending measure on Friday, averting a midnight government shutdown just hours after declaring he was considering a veto. Mr Trump said he was "very disappointed" in the package, in part because it did not fully fund his plans for a border wall with Mexico and did not address some 700,000 "Dreamer" immigrants who are now protected from deportation under a program that he has moved to eliminate. But the President praised the increases the bill provides for military spending and said he had "no choice but to fund our military". "My highest duty is to keep America safe," he said. The bill signing came a few hours after Mr Trump created last-minute drama by saying in a tweet that he was "considering" a veto. With Congress already on recess, and a government shutdown looming, he said that young immigrants now protected in the US under Barack Obama's Delayed Action for Childhood Arrivals "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." Mr Trump's veto threat was at odds with top members of his administration and House Speaker Paul Ryan, who had said on Thursday that he was supportive of the measure. The White House also issued a formal statement of administration policy indicating Mr Trump would sign the bill. Several advisers inside and outside the White House said earlier Friday that they suspected the tweet was just Mr Trump blowing off steam. Finally, in made-for-TV scheduling, Mr Trump took to twitter again to announce he'd be holding a news conference to talk about the bill. The drama was short-lived: An aide told reporters the signing was on. And telegraphing the outcome, an internal television feed advertised its next program: "President Trump Participates in a Bill Signing." Asked why he'd made the threat, Mr Trump said he'd "looked very seriously at the veto," but "because of the incredible gains that we've been able to make for the military that overrode any of our thinking". Mr Trump also warned Congress: "I will never sign another bill like this again." The will-he, won't he episode came hours after the Senate early Friday morning passed the $1.3 trillion spending package aimed at keeping the government open past midnight. Mr Trump has been increasingly frustrated with media coverage of the bill, spurred on by conservative Republican lawmakers and other critics who had spent recent days calling the president, inciting him, and making their cases loudly on cable news shows Mr Trump is known to watch. Rep. Mark Meadows, R-N.C., chairman of the House Freedom Caucus and a friend of the president, said in a tweet that the group would "fully support" a veto, adding that Congress should pass a short-term budget resolution while Trump and congressional leaders "negotiate a better deal for the forgotten men and women of America." Sen. Senator Bob Corker, R-Tenn., also egged Trump on. "Please do, Mr. President," he tweeted. "I am just down the street and will bring you a pen. The spending levels without any offsets are grotesque, throwing all of our children under the bus. Totally irresponsible." "Make my day, Mr. President," taunted Rep. Kurt Schrader, D-Ore. Senate passage of the bill averted a third federal shutdown this year, an outcome both parties wanted to avoid. While Mr Trump has repeatedly criticised Democrats over DACA, he cancelled the program last fall, ending the issuance of new DACA permits. A judge has forced the administration to continue issuing renewals. _______________ <strong>Read more:</strong> _______________ The spending package includes $1.6 billion for Mr Trump's long-promised border wall with Mexico. But less than half of the nearly 95 miles (153 kilometers) of border construction that have been approved can be spent on new barriers. The rest can only be used to repair existing segments. The money was far less than the $25 billion over 10 years that Mr Trump had asked for as part of a last-ditch deal that would have included providing a temporary extension of the DACA program. White House budget officials have nonetheless tried to spin the funding as a win. "We ended up asking for 74 miles worth of wall, we get 110. Not exactly what we wanted where we wanted," budget director Mick Mulvaney said Thursday. "But generally speaking, we think this is a really, really good immigration package." The House easily approved the spending package Thursday, 256-167, a bipartisan tally that underscored the popularity of the compromise, which funds the government through September. It beefs up military and domestic programs, delivering federal funds to every corner of the country. But action stalled in the Senate, as conservatives ran the clock in protest. Once the opponents relented, the Senate began voting, clearing the package by a 65-32 vote. "Shame, shame. A pox on both Houses - and parties," tweeted Sen. Rand Paul, R-Ky., who spent the afternoon tweeting details found in the 2,200-page bill that was released the night before. "No one has read it. Congress is broken." The omnibus spending bill was supposed to be an antidote to the stopgap measures Congress has been forced to pass — five in this fiscal year alone — to keep government temporarily running amid partisan fiscal disputes. But the overall result was unimaginable to many Republicans after campaigning on spending restraints and balanced budgets. Along with the recent GOP tax cuts law, the bill that stood a foot tall at some lawmakers' desks ushers in the return of $1 trillion deficits. Trying to smooth over differences, Republican leaders focused on military increases that were once core to the party's brand as guardians of national security. But even that remained a hard sell — a sign of the entrenched GOP divisions that have made the leadership's job controlling the majority difficult. They will likely repeat in the next budget battle in the fall.