Donald Trump has agreed to a Democratic plan to lift the debt limit for three months, fund the government and rush aid to Hurricane Harvey victims.The US president went against Republican leaders who wanted to extend a debt-limit increase for longer, until after the 2018 mid-term elections. Democrats announced the deal just before the House of Representatives passed $8bn (£6bn) for Harvey victims.Congress will need to approve the deal before it is finalised. Mr Trump told reporters aboard Air Force One he had a “very good meeting” with House Minority Leader Nancy Pelosi and Senate Minority Leader Chuck Schumer. “We had a very good meeting, we essentially came to a deal and I think the deal will be very good,” he said while travelling to North Dakota for an event on tax reform on Wednesday. “We agreed to a three-month extension on debt ceiling, which they consider to be sacred, very important.”The proposal attaches the disaster aid to a government funding bill that would raise the US debt limit and keep the government running through 15 December, setting up a fiscal showdown at the end of the year that Republicans had hoped to avoid. “Both sides have every intention of avoiding default in December and look forward to working together on the many issues before us,” Mrs Pelosi and Mr Schumer said in a joint statement.Leaders from both parties met Mr Trump at the White House on Wednesday morning. Following the meeting, Republican House Speaker Paul Ryan called the Democratic proposal “unworkable” and “ridiculous”, putting the president at odds with his own party. A free agent president – Anthony Zurcher, BBC News, WashingtonDonald Trump has gone rogue. When it was time to choose between Democrats and Republicans in Congress and within his own administration, the president tilted left.Republicans in the Senate had hoped to tie hurricane relief to a lengthy extension of the debt limit, taking away a key bit of Democratic leverage until after the 2018 midterm elections. House Republican hardliners, who welcomed a looming budget crisis, didn’t want any debt measures in the bill at all. The president gave neither what they wanted.Instead the immediate threat of a government shutdown or debt default is averted, but the hard negotiations are only delayed. Democrats can prepare for an end-of-year showdown over the administration’s proposed sweeping budget cuts while knowing their support will still be needed on a debt vote.Meanwhile, congressional Republicans are left fuming. Frayed relations between the president and Congress take another hit, and there’s no guarantee the party’s rank-and-file will march along with this deal. It wouldn’t be the first time the party has fractured, forcing its leadership to rely on Democratic votes. But it’s jaw-dropping that it might happen with Democrats wholly in the minority. For that, they have Mr Trump to thank.Treasury Secretary Steve Mnuchin had also reportedly urged Mr Trump to pursue a longer-term debt-limit deal but has insisted that raising the borrowing limit was imperative in order to quickly send aid to Texas.The deal includes Democratic support in the Senate for the first instalment of disaster relief aid for Hurricane Harvey victims in Houston, where flooding has devastated the Texan city. The House overwhelmingly passed a bill to provide $7.9bn for victims of the floods before the Federal Emergency Management Agency (Fema) runs out of funds later this week. The House approved the funding 419 to three, with three Republicans voting “no”.The relief package comes as a more powerful storm, Hurricane Irma, barrels toward Puerto Rico and Florida. Mr Trump’s deal with the Democrats means that the Republican-controlled Congress will have to address partisan issues such as healthcare and immigration later in the year while negotiating with Democrats over a debt vote. “Given Republican difficulty in finding the votes for their plan, we believe this proposal offers a bipartisan path forward to ensure prompt delivery of Harvey aid as well as avoiding a default, while both sides work together to address government funding, DREAMERS, and healthcare,” Mr Schumer and Mrs Pelosi said.