Washington (CNN) President Donald Trump cut a deal with Congressional leaders Wednesday that will raise the debt ceiling, keep the government open and funded and secure disaster relief dollars for Hurricane Harvey.

The problem? He cut the deal with Democratic leaders -- and expressly against the wishes of Republicans.

Senate Minority Leader Chuck Schumer and President Donald Trump in the oval office Wednesday.

Trump agreed to a three month extension of government funding and hike to the debt ceiling through mid-December to ensure that the Harvey relief money he has requested -- $8 billion or so -- would quickly move through Congress.

House Speaker Paul Ryan and Senate Majority Leader Mitch McConnell wanted a longer debt ceiling extension in order to ensure that they wouldn't be backed into a negotiating corner by Democrats later this year with the possibility of the US defaulting on its debt and the government shutting down both hanging in the balance.

JUST WATCHED Schumer, McConnell pleased after Trump meeting Replay More Videos ... MUST WATCH Schumer, McConnell pleased after Trump meeting 01:28

Hours before Trump cut the deal, Ryan denounced such a plan in his weekly press conference. "I think that's ridiculous and disgraceful that [Democrats] want to play politics with the debt ceiling at this moment when we have fellow citizens in need to respond to these hurricanes so that we do not strand them," Ryan told reporters.

Read More