US president Donald Trump unexpectedly cut a three-month debt limit deal with Democrats yesterday, defying members of his own party who wanted to extend a debt limit increase until after the 2018 mid-term elections.

The bipartisan agreement also went against key figures in Trump’s own administration including US treasury secretary Steven Mnuchin.

Mnuchin told reporters after Trump announced the terms of the deal:

We could have done a one-year deal today.

Republican house speaker Paul Ryan called the Democratic proposal “unworkable” and “ridiculous”. He said:

I personally believe, for the credit markets’ sake, we should have longer extensions of these.

The deal attaches the $8bn worth of Hurricane Harvey disaster aid to a government funding bill that would raise the US debt limit for just three months until 15 December.

Senate minority leader Chuck Schumer said:

It was a really good moment of some bipartisanship and getting things done.

Trump told reporters aboard Air Force One that he had a “very good meeting” with both Schumer and House minority leader Nancy Pelosi.

We essentially came to a deal and I think the deal will be very good. We agreed to a three-month extension on debt ceiling, which they consider to be sacred, very important.

Why did Trump agree to a shorter debt extension?

One possible reason for Trump’s decision to push ahead with a short-term deal is because he wants to ensure he has the ability to increase military funding later this year, according to Mnuchin.

[Trump] is very focused with what’s going on in North Korea and other parts of the world today. The president wasn’t willing to give up his need for additional military spending.

Over the weekend, North Korea carried out its sixth nuclear test since 2006. The size of the latest test was equivalent to a 6.3 magnitude earthquake.

Congress will need to approve the debt limit deal before it is finalised, but even more drastic changes may be imminent.

Trump and Schumer agreed to pursue a deal that would permanently remove the requirement that Congress repeatedly raise the debt ceiling, three people familiar with the decision told the Washington Post on Thursday.