President Donald Trump is playing down the threat of a second partial government shutdown as Republicans in Congress clear a path for him to accept a deal on border security funding.

Trump is likely to grudgingly sign the legislation and then immediately use his executive authority to fund additional border measures, said a person who talked to the president Tuesday and asked not to be identified to discuss private conversations.

The president said on Twitter that he is “looking over all aspects knowing that this will be hooked up with lots of money from other sources.” He said he “Will be getting almost $23 BILLION for Border Security.” He didn’t explain how he arrived at that number.

Earlier, Trump expressed reservations about the agreement reached late Monday, though he also said, “I don’t think you’re going to see a shutdown.” The president said at the White House that he may decide to declare a national emergency to bypass Congress to get funds for a wall—an option opposed even by many Republicans, in part because it’s likely to be challenged in court.

Senate Majority Leader Mitch McConnell told reporters Tuesday that Trump “got a pretty good deal here.” Senate Appropriations Chairman Richard Shelby of Alabama called the agreement reached Monday night a “down payment” on the border wall Trump wants and added, “We hope that the president will support it.”

If spending bills aren’t passed and signed into law by midnight Friday, nine government departments including the Treasury and Homeland Security would close again, just weeks after the five-week shutdown triggered when Trump refused to accept an earlier congressional spending deal.

The tentative pact reached Monday night provides $1.375 billion for 55 new miles (88.5 kilometers) of border fencing in Texas’s Rio Grande Valley area, according to congressional aides who spoke on condition of anonymity. That’s far short of the $5.7 billion Trump wants for a wall. But the agreement also rejects limits Democrats sought on detentions of immigrants apprehended in the U.S.

McConnell and other Republicans said Trump may be able to reprogram other unused money in the budget to put toward his proposed wall.

“He ought to feel free to use whatever tools he can legally use to enhance his effort to secure the border, so I would not be troubled by that,” said McConnell of Kentucky.

Senator Roy Blunt of Missouri, a member of GOP leadership, said he’s examining the federal budget for ways Trump could use available funds for a wall without using an emergency declaration.

“If we get to the place where it’s time to talk to the president about those I intend to,” Blunt said. As an example, he pointed to a drug program that has $800 million in unspent funds. Other funds might be shifted from existing programs, he said.

Senate Minority Leader Chuck Schumer said, though, that the president would need approval from Congress to move money within the budget.

“He doesn’t have the authority to do it without House permission,” and that Democratic-controlled chamber may not agree, said Schumer of New York.

Senator Susan Collins of Maine, a moderate Republican, said she’s urging Trump to sign the agreement and not take budget funds for the barrier without approval from Congress.

“For him to reprogram billions of dollars without congressional approval would undermine the appropriations process and be of dubious constitutionality,” Collins said.

McConnell said he recommended that Trump wait to ensure the legislation properly reflects the agreement before announcing whether he’ll sign it. Shelby said he expects the bills to be introduced Wednesday.

The agreement on the remaining seven spending bills would keep government agencies open through the end of the fiscal year, including the Department of Homeland Security that oversees border protection. It was a rare feat of bipartisan compromise that only 24 hours earlier had seemed out of reach. But the drawn-out struggle is sure to be revived in the next budget battle and continue into the 2020 campaigns for the White House and Congress.

Democrats dropped their demand for a cap on detention beds for immigrants detained within the U.S. Instead, the deal would set an average daily cap at 45,274 beds—less than the 49,057 now detained, two congressional aides said. Democrats believe that will drop the number detained to 40,520 by Sept. 30. But the aides said Trump would retain authority to expand the number of beds by transferring money from other security accounts. Trump could boost the number of beds as high as 58,500 with that authority—enough to respond to a surge in illegal immigration and arrests, one aide said.

Some of the president’s allies who helped convince him to hold out for wall funding last year panned the committee’s negotiation almost as soon as the details were made public. The leader of the conservative House Freedom Caucus, Mark Meadows of North Carolina, said he believes Trump will sign the measure and then use executive action to gain additional funds for the wall.

A key sticking point had been funding for detention beds for immigration enforcement, which Democrats wanted to limit as a way to in effect force Immigration and Customs Enforcement to put less of a priority on undocumented immigrants without criminal backgrounds.

One aide said the 55 new miles of border barrier would be double the amount of new miles provided in fiscal 2018 and nearly three times as much as would have been available if current funds had been extended through September. The Border Patrol could use any design in current use, including steel slats, but not a purely concrete wall some of Trump’s supporters have cheered.

House Democrats opened the talks with an offer of no new money for border barriers, while Senate Democrats had offered $1.6 billion in funds before the shutdown began.

Trump has been demanding a wall since the 2016 presidential campaign. The recent shutdown, the nation’s longest, ended when he signed a three-week spending bill on Jan. 25 and both parties agreed to create a 17-member committee to negotiate a solution.

The president has a history of tearing up bipartisan agreements, including a potential one last year that would have provided $25 billion in wall money in exchange for protection from deportation for young undocumented immigrants.

The deal would allow a number of departments to continue operating, including Agriculture, Commerce, Interior, Justice, State, Transportation, Treasury, and Housing and Urban Development. The Food and Drug Administration and Environmental Protection Agency would also be funded.