President Trump and Democratic leaders on Wednesday did what Washington does best: striking a bipartisan deal to boost borrowing and spending, keeping the government running into the next fiscal year and speeding disaster relief to Texas and Florida.

Mr. Trump accepted the deal offered by House Minority Leader Nancy Pelosi and Senate Minority Leader Charles E. Schumer at a White House meeting, seeing it as a chance to get ahead of a series of pressing fiscal problems that needed to be fixed this month.

But the agreement blindsided Republican leaders, including House Speaker Paul D. Ryan, who just hours earlier called Democrats’ proposal “ridiculous and disgraceful.”

Under terms of the deal, the government will operate on stopgap funding through Dec. 15, avoiding a shutdown showdown at the end of the month. The Treasury Department will gain more room to borrow through mid-December, averting a potential default on obligations. And relief efforts for Hurricane Harvey will receive an immediate infusion of cash.

“We agreed to a three-month extension on debt ceiling, which they consider to be sacred — very important — always we’ll agree on debt ceiling automatically because of the importance of it,” the president told reporters aboard Air Force One.

The deal marks the first debt hike for Mr. Trump, who during the campaign repeatedly blasted his predecessor for the sea of red ink that spilled across the federal budget. But the White House said it wanted to “clear the decks” to focus on the president’s big priorities this month, such as tax reform.

Democrats, who got exactly what they were seeking in the agreement, said it showed Mr. Trump was willing to cut deals.

“Today was a good day in a generally very partisan town,” said Mr. Schumer, New York Democrat.

Republicans on Capitol Hill wanted a longer debt deal that would prevent another crisis in December. After Mr. Trump undercut them, some fired back.

Sen. James Lankford, Oklahoma Republican, said any debt hike should be accompanied with spending cuts or other reforms, and the three-month deal Mr. Trump struck “doesn’t do either.”

“The Pelosi-Schumer-Trump deal is bad,” said Sen. Ben Sasse, Nebraska Republican.

At the meeting, Mr. Trump brushed aside objections to the Democratic deal from every Republican in the room, including Treasury Secretary Steven T. Mnuchin, according to a source.

Mr. Mnuchin was in the process of explaining in depth why a longer debt limit and funding bill was a better path forward when the president interrupted him and basically told Democrats that he wanted to make the deal.

“It seemed pretty spontaneous,” said the source, adding that Mr. Trump appeared frustrated with the standoff between Republican and Democratic lawmakers and moved to break the deadlock.

Speaking to reporters later in the day, Mr. Mnuchin described himself as pleased that there was a debt increase and that Harvey funding was getting approved.

He said Mr. Trump decided that a yearlong borrowing increase would have also meant a yearlong stopgap spending bill, which would have denied the president a chance to boost defense spending.

“Our No. 1 priority was getting funding for Harvey. Let me be very clear: that’s the president’s No. 1 agenda and we accomplished that,” the secretary said.

A Democratic strategist said Mr. Schumer went into the meeting with the president convinced Democrats would have more “leverage” in other pending legislative battles if they obtained a short-term extension on the debt limit through Dec. 15.

A Democratic strategist said Mr. Schumer went into the meeting with the president convinced Democrats would have more leverage in other pending legislative battles if they obtained an extension on the debt limit through Dec. 15.

Mr. Trump’s agreement to Mr. Schumer’s proposal shows that the president is “utterly clueless about how the Hill operates,” this source said.

“It shows that [Mr. Trump] doesn’t really understand how much House and Senate Republican leaders hate to scramble for votes on the debt limit extension,” the strategist said. “It’s by far the worst vote these guys have got to take. Now they’re going to have to take this vote at least twice.”

Senate Majority Leader Mitch McConnell, Kentucky Republican, said Mr. Trump can explain the deal for himself.

He added that the president appeared to want to find unity at a time of multiple crisis points, including the country’s fiscal situation and natural disasters.

“His feeling was we needed to come together and not generate a feeling of division at a time of genuine national crisis,” Mr. McConnell said.

The House earlier in the day passed a stand-alone $7.85 billion cash infusion for Harvey recovery aid. Of that, $740 billion will go to fill out the budget for the Federal Emergency Management Agency, while $450 million will go to the Small Business Administration, whose loans are critical to getting small businesses operating again after a storm.

“Help is on the way,” said Rep. John Abney Culberson, a Texas Republican who said his brother and his in-laws were among those whose homes were devastated by the flooding. “Today in Congress, there are no Republicans and no Democrats.”

Mr. Ryan had said the stand-alone bill was the fastest way to get Harvey relief passed, and he insisted that Congress wouldn’t leave for the weekend without finishing.

Mr. McConnell, though, said he wanted a debt increase attached to the Harvey aid, using the crisis legislation to help ease passage of the more controversial debt hike.

But after the White House meeting, Mr. McConnell said he would offer Mr. Trump’s deal as the path forward when the Senate takes up the Harvey legislation.

Senators also said additional money would be added into the stopgap spending bill to help FEMA prepare and assist in Hurricane Irma, which is racing toward Florida.

“If this isn’t the definition of an emergency, I don’t know what is,” Mr. McConnell said.

The federal government’s debt is nearing $20 trillion, and Washington has been bumping up against its borrowing limit, set into law, for months.

The Trump administration says that without more room, it won’t be able to borrow money as of later this month, which would result in a default on some obligations.

Under President Obama, Republicans regularly demanded that conditions be attached to debt hikes. But Mr. Trump short-circuited those demands and said the government has to make good on its obligations.

• Dave Boyer contributed to this report.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.