“I think that’s a ridiculous idea,” House Speaker Paul Ryan said Wednesday morning during a press conference. He was referring to the offer that House Minority Leader Nancy Pelosi and Senate Minority Leader Chuck Schumer had just floated, in a joint statement, to increase the debt ceiling for three months.

“Let’s think about this,” Ryan said. “We’ve got all this devastation in Texas, we’ve got another unprecedented hurricane about to hit Florida, and they want to play politics with the debt ceiling?” It was the first of three times in the span of roughly one minute that Ryan lobbed the “playing politics with the debt ceiling” line at his Democratic counterparts. He called the offer “ridiculous and disgraceful,” and “unworkable,” and claimed it put hurricane relief in jeopardy.

“I hope they don’t mean it,” he scoffed.

Maybe they did, maybe they didn’t. Republicans felt confident that Democrats were bluffing and wouldn’t really oppose a long-term debt ceiling increase if forced to vote on it. But now we’ll never know. Because a few hours after Ryan’s press conference, President Trump accepted the Democrats’ offer.

Thanks to the deal cut by Trump “and the Senate and House Democratic leadership,” as a less-than-amused Senate Majority Leader Mitch McConnell would call it during his Wednesday afternoon press conference, the initial relief for Hurricane Harvey, a three-month stopgap government funding measure, and a three-month extension of the debt ceiling will be rolled into one package for a vote expected this week. It’s not even a “deal” in the sense of give-and-take between two sides. It is, to the letter, the request that Democrats had made and that Ryan and the leadership team had decried as an affront to God immediately after. Trump’s move forces congressional Republicans to have to make multiple, painful debt ceiling votes ahead of the midterms, and it preserves the Democrats’ leverage in the December spending negotiations. Democrats can’t believe it, either.

“It is fair to say we are surprised,” a Democratic aide familiar with the discussions told me afterward.

The plan that House GOP leaders had been not-so-secretly pushing this week was to hold a standalone vote on the Harvey relief package on Wednesday—they did, and it passed around noon, 419–3—and send it to the Senate. The Senate would then tack on a clean 18-month debt ceiling extension and send the combined package back to the House. Then Ryan, under cover of the popular emergency Harvey aid bill, would bring the package to the floor. Conservative Republicans, who loathe clean debt ceiling increases, had been making threats about Ryan’s future as speaker if he made such a move. But if Ryan had Trump’s support, it would give him the excuse he needed.

“I think a lot of people are waiting to hear from the president on this,” Alabama Rep. Bradley Byrne told me after the House GOP conference meeting Wednesday morning. Byrne added he heard the White House was driving the strategy.

And he was right. According to the Democratic aide, Ryan made his case for the 18-month debt ceiling extension at the late morning White House meeting between Trump and congressional leaders. Democrats rejected it. Then Ryan offered six months. Democrats rejected that, too, and then Trump—who only has so much patience for long meetings—agreed to Democrats’ three-month extension. If passed, the debt ceiling extension and government funding bill will both expire on Dec. 15. Now Ryan will be bringing a bill to the floor that conservatives don’t want and he doesn’t want, either.

At his press conference on Wednesday afternoon, a gleeful Senate Minority Leader Chuck Schumer was asked why he thought Trump went along with Democrats’ strategy instead of his own party’s.

“The bottom line is the president listened to the arguments, we think we made a very reasonable argument, a strong argument,” Schumer said, “and to his credit, he went with the better argument.”

But if Trump cared about the political priorities of his party, then he definitely did not choose the better argument. This is why there was a partisan fight over this in the first place. Democrats floated the three-month debt ceiling extension because they wanted it to align with the big end-of-year appropriations fight coming in December. As a senior Democratic aide told me, Trump’s need to usher through the debt ceiling in December with Democratic help might force him to cut deals on other priorities in the appropriations negotiations. It could help Democrats secure a Deferred Action for Childhood Arrivals program replacement to their liking, for instance, or health care spending, or whatever else they want. As a Republican close to leadership told Axios’ Jonathan Swan after the news broke, “Schumer has inserted himself into all negotiations in the winter.”

When asked a similar question about why Trump went with the Democrats, McConnell said that the president felt it would be improper to create divisiveness during a time of national crisis. That doesn’t sound a whole lot like our president, either. So what was Trump thinking? Here are two broad but possible explanations.

The first is that he was confused, and this was the latest expression of how he doesn’t understand Capitol Hill. If that’s the case, he could always change his mind on Twitter within a matter of hours, or just push through it and order his aides to retrofit explanations for how of course he knew what he was doing. The latter process appears to be underway.

The other is that he’s done, or toying with the idea of being done, with congressional Republicans. He has relied on them to push through all of his top priorities, and how’s that worked out for him? At his core, he doesn’t care about what wins he gets, so long as he gets wins. Trump may be recognizing that if you want to get something done on Capitol Hill, your best bet is to bypass Republicans altogether and go straight to Nancy Pelosi.