(Adds Trump confirmation of debt ceiling deal)
WASHINGTON, Sept 6 (Reuters) - President Donald Trump, siding with Democrats over his fellow Republicans, said he agreed on Wednesday with lawmakers to pass an extension of the U.S. debt limit until Dec. 15, potentially avoiding an unprecedented default on U.S. government debt.
After meeting with congressional leaders from both parties at the White House, Trump said he also agreed on a funding bill until mid-December that would avert a government shutdown, and disaster aid for Hurricane Harvey victims.
"We have an extension, which will go out to December 15th. That will include debt ceiling, that will include (short-term spending for the coming fiscal year) and it will include Harvey, the amount of money to be determined," Trump told reporters aboard Air Force One.
Trump, who has had fraught relations with congressional leaders in both parties, is heading into the toughest legislative stretch of his presidency. He described the talks at the White House on Wednesday as cordial and professional.
A source briefed on the meeting said Treasury Secretary Steve Mnuchin and all Republicans there argued for a debt limit increase for a longer period. But by the end of the meeting, Trump sided with Democrats who wanted a three-month increase.
"Both sides have every intention of avoiding default in December and look forward to working together on the many issues before us," top Senate Democrat Chuck Schumer and top House of Representatives Democrat Nancy Pelosi said in a statement.
The U.S. dollar got a boost on news of agreement on the debt ceiling, which caps how much money the U.S. government can borrow. Many conservatives in Congress are loath to raise it without spending cuts.
The Treasury Department has said the ceiling must be raised in the next few weeks. If not, the government would be unable to borrow more money or pay its bills, including its debt payments. That could hurt the United States' credit rating, cause financial turmoil, harm the U.S. economy and possibly trigger a recession.
Earlier in the day, Republican House Speaker Paul Ryan had called the Democratic proposal for a three-month increase "a ridiculous idea" that would "play politics with the debt ceiling."
Lawmakers are facing pressing legislative priorities.
Trump on Tuesday also gave a Congress six months to pass legislation to decide the fate of the 800,000 so-called Dreamers after rescinding a five-year-old program that had protected them from deportation.
Earlier, Ryan said any legislation to address the Dreamers would also need to address border security, a position sure to antagonize Democrats. Ryan also said any immigration legislation the House would consider would have to have the support of Trump.
Schumer urged Republicans to put forward legislation protecting the Dreamers without other issues attached.
The House on Wednesday approved roughly $8 billion in initial emergency aid for relief and rebuilding after Hurricane Harvey, which tore into Texas on Aug. 25. The measure, which provides $7.4 billion for the Federal Emergency Management Agency and $450 million for the Small Business Administration, will now go to the Senate and, barring unexpected setbacks, could be on Trump's desk to sign by the end of the week.
The party in power in this case Republicans - often argues for as long of a debt limit increase as possible for two reasons. It protects members of Congress from casting multiple votes on the politically unpopular legislation over a short period of time and especially in the run-up to the 2018 congressional elections, and it lends added stability to financial markets.
Democrats, who are in the minority in Congress and no longer control the White House after eight years of the Obama administration, have succeeded in forcing that second vote on a debt limit bill later this year if the plan Trump embraced ends up passing this week.
Since their votes are needed to pass debt ceiling increases, Democrats potentially could use the next vote debt limit vote at the end of this year as leverage to win concessions on a tax reform package that Trump badly wants to advance. (Additional reporting by Jeff Mason, Roberta Rampton, Amanda Becker, Doina Chiacu, Richard Cowan, James Oliphant and David Morgan; Writing by Will Dunham; Editing by Alistair Bell)