President Donald Trump speaks in the Diplomatic Room of the White House in Washington, Friday, March 23, 2018, about the $1.3 trillion spending bill. (AP Photo/Manuel Balce Ceneta)

President Donald Trump speaks in the Diplomatic Room of the White House in Washington, Friday, March 23, 2018, about the $1.3 trillion spending bill. (AP Photo/Manuel Balce Ceneta)

WASHINGTON (AP) — President Donald Trump grudgingly signed a $1.3 trillion federal spending measure Friday and averted a midnight government shutdown — but only after undercutting his own negotiators and setting off a mini-panic with a last-minute veto threat. The episode further eroded the already damaged credibility of both the president and a White House staff that had assured the nation he was onboard.

Trump said he was “very disappointed” in the package, in part because it did not fully pay for his planned border wall with Mexico and did not extend protection from deportation to some 700,000 “Dreamer” immigrants due to lose coverage under a program the president himself has moved to eliminate.

ADVERTISEMENT

But Trump praised the bill’s provisions to increase 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 Trump created his latest round of last-minute drama by tweeting 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 U.S. under Barack Obama’s Delayed Action for Childhood Arrivals program “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.”

Trump’s veto threat put him at odds with top members of his administration and Republican House Speaker Paul Ryan, who had said publicly that Trump supported the bill. Advisers inside and outside the White House said they never expected Trump to go through with his threat and believed he was likely just blowing off steam.

Finally, in made-for-TV scheduling, 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 it was a monologue by Trump, not a news conference. He answered two questions called out to him as he left the room.

Asked why he’d made the threat, 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.”

He warned Congress, “I will never sign another bill like this again.”

ADVERTISEMENT

The giant spending bill, though, expires Sept. 30, and another funding measure will be needed. To boost the party-in-power’s ability to muscle its agenda through Congress, he called for an overhaul of Senate rules to allow for simple-majority votes on all bills and appealed to Congress for line-item veto power to kill specific spending items he disagrees with. The Supreme Court ruled in 1998 that a congressionally passed line-item veto was unconstitutional.

The will-he, won’t-he episode came hours after the Senate’s early morning passage of the huge spending package aimed at keeping the government open past Friday midnight.

Trump backed the bill only reluctantly, and Republican lawmakers and aides acknowledged the deal involved trade-offs for Democratic votes that were needed despite the GOP majority lock on Congress.

The president had been especially frustrated in recent days by media coverage of the bill and by conservative Republican lawmakers, some of whom had been calling to harangue him and making their cases loudly on cable news shows he 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. Bob Corker, R-Tenn., also egged Trump on to a veto. “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.”

Trump’s decision to ultimately sign the bill came after a call from Speaker Ryan. At around 9:30 a.m. Friday, Ryan encouraged the president to sign the bill, according to a person familiar with the communication, and discussed all the wins it delivered, especially for the military. The person spoke on condition of anonymity to discuss the private conversation.

It was the second time Ryan had been forced to intervene this week. On Wednesday, the speaker made a surprise trip to the White House, with Senate Majority Leader Mitch McConnell joining in by phone, to try to keep Trump in accord. A White House official that day denied that Trump was considering vetoing the package, and Ryan emerged from the huddle saying Trump would support the bill.

The veto threat pushed to the forefront concerns over Trump and his staffers’ eroding credibility. The spending bill had been negotiated by Trump’s own aides — with sign-off from the boss on every major decision.

The surprise threat also threatened to undermine future efforts by White House staff tasked with negotiating on Trump’s behalf.

“We don’t have a stable, reliable partner with whom we can work in the White House,” said Rep. Gerry Connolly, D-Va. He added that no deal can be deemed secure until Trump “puts his signature on it.”

“It has consequences going forward,” he added. “Who wants to trust a comprehensive immigration deal and put a lot of time and effort into it, only to see it at the eleventh hour derailed because, I don’t know, he turns on Fox News and somebody criticizes it?”

Trump’s decision to ultimately sign the bill averted what would have been the third federal shutdown of the year, an outcome both parties wanted to avoid.

The omnibus spending bill, which will fund the government through September, beefs up military and domestic programs, delivering federal funds to every corner of the country.

But the plan was rejected by many Republicans who campaigned on spending restraints and balanced budgets.

___

Associated Press writers Matthew Daly, Zeke Miller and Jonathan Lemire contributed to this report.