Speaker Paul Ryan on Thursday reacted to President Trump siding with Democratic leaders a day earlier on a proposal involving a short-term extension of the debt limit and a short-term spending bill.

During an interview with The New York Times, congressional editor Jonathan Weisman pointed out that Mr. Trump agreed to the Democrats' plan not long after Ryan called it "ridiculous" and "disgraceful."

"I sort of noticed that," Ryan said Thursday.

Get Breaking News Delivered to Your Inbox

Asked how that happened, Ryan took a brief pause, "Ahhh...you know...um…," and said that the president didn't want to have a partisan fight amid the response to Hurricane Harvey and as Hurricane Irma approaches the East Coast.

"What the president didn't want to do was have some partisan fight in the middle fo the response to this," Ryan said. "He wanted to make sure, in this moment of national crises, where our country is getting hit by two horrible hurricanes, he wanted to have a bipartisan response and not a food fight on the timing of the debt limit attached to this bill."

"That's what I believe his motivation was," he added.

Ryan said that he personally believes that a longer-term extension of the debt limit is better for the credit market.

On Wednesday, Mr. Trump surprised Republicans when during a Oval Office meeting with congressional leaders, he endorsed a plan from Senate Minority Leader Chuck Schumer, D-New York, and House Minority Leader Nancy Pelosi, D-California, that extended both the debt ceiling and government funding for three months into December. GOP leaders, however, first pushed for an 18-month extension and then a six-month hike, according to a congressional aide briefed on the meeting.

Pelosi praised Schumer's negotiating tactics Thursday, saying, "He could speak New York to the president."

Senate Majority Leader Mitch McConnell, R-Kentucky, formally filed cloture on a bill that would provide funding for the Harvey relief effort, and extend the debt limit and government funding through Dec. 8.