WASHINGTON (AP) — Under mounting pressure from his own party, President Donald Trump appeared to be grudgingly leaning toward accepting an agreement Tuesday that would head off a threatened second government shutdown but provide just a fraction of the money he’s been demanding for his Mexican border wall.

Trump said he would need more time to study the plan, but he also declared he was not expecting another shutdown this weekend when funding for parts of the government would run out. He strongly signaled he planned to scrounge up additional dollars for the wall by raiding other federal coffers to deliver on the signature promise of his presidential campaign.

“I can’t say I’m happy. I can’t say I’m thrilled,” Trump said of the proposed deal. “But the wall is getting built, regardless. It doesn’t matter because we’re doing other things beyond what we’re talking about here.”

Accepting the deal, worked out by congressional negotiators from both parties , would be a disappointment for a president who has repeatedly insisted he needs $5.7 billion for a barrier along the U.S.-Mexico border, saying the project is paramount for national security. Trump turned down a similar deal in December, forcing the 35-day partial shutdown that left hundreds of thousands of federal workers without paychecks and Republicans reeling. There is little appetite in Washington for a repeat.

Lawmakers tentatively agreed Monday night to a deal that would provide nearly $1.4 billion for border barriers and keep the government funded for the rest of the fiscal year, which ends on Sept. 30.

The agreement would allow 55 miles (88 kilometers) of new fencing — constructed using existing designs such as metal slats— but far less than the 215 miles (345 kilometers) the White House demanded in December. The fencing would be built in Texas’ Rio Grande Valley.

ASSOCIATED PRESS A migrant from Honduras looks from the border fence into the U.S. side to San Diego, Calif., from Tijuana, Mexico.

Full details were not expected to be released until Wednesday as lawmakers worked to translate their verbal agreement into legislation. But Republican leaders urged Trump to sign on.

“I hope he signs the bill,” said Senate Majority Leader Mitch McConnell, who joined other GOP leaders in selling it as a necessary compromise that represented a major concession from Democrats.

Appropriations Committee Chairman Richard Shelby, R-Ala., expressed optimism Trump would be on board.

“We believe from our dealings with them and the latitude they’ve given us, they will support it,” he said. “We certainly hope so.”

Others were less upbeat. Sen. John Cornyn, R-Texas, who traveled with the president to a rally in Cornyn’s home state Monday night, said, “My impression flying back with him from El Paso last night is that he thinks it’s pretty thin gruel.”

A presidential rejection of the deal could plunge Congress into a new crisis, as lawmakers have no clear Plan B. They need to pass some kind of funding bill to avoid another shutdown at midnight Friday and have worked to avoid turning to another short-term bill that would only prolong the border debate.

Speaking at a Cabinet meeting, Trump said of a possible shutdown: “I don’t think it’s going to happen.”

Still, he made clear that, if he does sign on to the deal, he is strongly considering supplementing it by moving money from what he described as less important areas of government.

“We have a lot of money in this country and we’re using some of that money — a small percentage of that money — to build the wall, which we desperately need,” he said.

That could be more difficult than he made it sound, facing challenges in Congress or federal court or both.

The White House has long been laying the groundwork for Trump to use executive action to bypass Congress and divert money into wall construction. He could declare a national emergency or invoke other executive authority to tap funds including money set aside for military construction, disaster relief and counterdrug efforts.

Previewing that strategy last week, acting White House Chief of Staff Mick Mulvaney said, “We’ll take as much money as you can give us, and then we will go off and find the money someplace else — legally — in order to secure that southern barrier.” He said more than $5.7 billion in available funds had been identified.

McConnell, who had previously said he was troubled by the concept of declaring a national emergency, said Tuesday that Trump “ought to feel free to use whatever tools he can legally use to enhance his effort to secure the border.”

The framework now under consideration contains plenty to anger lawmakers on both the right and left — more border fencing than many Democrats would like and too little for conservative Republicans — but its authors praised it as a genuine compromise that would keep the government open and allow everyone to move on.

Senate Democratic leader Chuck Schumer urged Trump to accept the package to avert another shutdown, calling the tentative accord “welcome news.”

But the proposal was met with fury by some on the right, including Fox News Channel’s Sean Hannity, a close friend of the president, who slammed it as a “garbage compromise.”

Jenny Beth Martin, co-founder of the Tea Party Patriots, released a scathing statement saying she and others had been “hoodwinked.”

“This so-called ‘deal’ is worse than a joke,” she said.

The hosts of Trump favorite “Fox & Friends,” however, urged the president to agree to the deal and keep the government open, a relief to White House officials and congressional Republicans who had been nervously watching the roll call of conservative media voices, trying to predict where Trump would land.

Conservative Rep. Mark Meadows, R-N.C., a close ally of the president, said that if Trump does agrees to the deal, he could be spared a “conservative uproar because everyone expects executive action to follow.” That’s despite concerns from many Republicans about executive over-reach and the precedent Trump might be setting for future presidents of both parties.

“Two things are clear. We will not have a shutdown of the government and executive action to reprogram additional border security dollars is required,” Meadows said.

After the El Paso rally, Trump climbed back aboard Air Force One elated by his boisterous crowd. But his attention quickly turned to the deal as the presidential plane began to streak away from the border city.

As aides filled him in on the outlines, Trump kept an eye on the coverage on Fox News, which was playing onboard, according to a Republican familiar with the president’s interactions but not authorized to speak publicly about private conversations.

And, despite the late hour, Trump began calling allies, a process he continued Tuesday from the White House.

The president made clear that he had wanted more money for the wall and worried that it was being spun as a defeat for him in the media, according to the Republican. But others expected him to sign on nonetheless.

___

Associated Press writers Darlene Superville and Lisa Mascaro in Washington contributed to this report