* House speaker called plan Trump later backed "disgraceful"
* Conservative groups lamenting "cave-in" to Democrats
* Word of the deal helps push dollar higher (Recasts, adds conservative reaction, Senate aide on debt limit provision, White House legislative director, Cornyn, updated market reaction)
WASHINGTON, Sept 6 (Reuters) - President Donald Trump forged a surprising deal with Democrats in Congress on Wednesday to extend the U.S. debt limit and provide government funding until Dec. 15, embracing his political adversaries and blindsiding fellow Republicans in a rare bipartisan accord.
Trump, living up to his reputation for unpredictability, met at the White House with congressional leaders from both parties and overruled Republicans and his own treasury secretary who wanted a longer-term debt-limit extension rather than the three-month Democratic proposal the president embraced.
If passed by the Republican-led Congress, the agreement would avert an unprecedented default on U.S. government debt, keep the government funded at the outset of the fiscal year beginning Oct. 1 and provide aid to victims of Hurricane Harvey.
"It was a really good moment of some bipartisanship and getting things done," top Senate Democrat Chuck Schumer said.
Less than an hour before the meeting, Republican House of Representatives Speaker Paul Ryan had called the Democratic proposal that Trump later embraced a "ridiculous and disgraceful" idea that would "play politics with the debt ceiling."
While the deal staved off what had been expected to be a bruising political fight this month, there were no guarantees for agreement on longer-term moves in December.
Even with the three-month extension of the debt limit, a Senate Republican aide told reporters that nothing in the tentative deal would stop the Treasury Department from using its powers to extend the deadline, depending on revenue flow. In the past, the debt limit deadline has been extended for several months under those powers.
'NEEDED TO COME TOGETHER'
Senate Majority Leader Mitch McConnell, overridden by Trump during the meeting, said he would bring the deal to the Senate floor for a vote.
"The president can speak for himself, but his feeling was that we needed to come together, to not create a picture of divisiveness at a time of genuine national crisis," McConnell told reporters.
The agreement was an uncommon instance of bipartisan compromise since Trump took office in January. Washington has suffered through bitter partisanship that has at times left the U.S. capital dysfunctional under Trump and his Democratic predecessor, Barack Obama. Trump had tangled repeatedly with Schumer and top House Democrat Nancy Pelosi.
"We had a very good meeting with Nancy Pelosi and Chuck Schumer," Trump, a wealthy businessman who as a candidate touted his deal-making skills, told reporters aboard Air Force One, without mentioning McConnell or Ryan, with whom he has had fraught relations.
"We agreed to a three-month extension on debt ceiling, which they consider to be sacred, very important. Always we'll agree on debt ceiling, automatically because of the importance of it, Trump said.
Conservative groups were aghast, accusing Trump of caving in to the Democrats rather than insisting on spending cuts to accompany the debt ceiling increase, and some hard-line Republicans expressed opposition to it.
Republican leaders and Treasury Secretary Steve Mnuchin pushed in the meeting for an 18-month debt limit hike, then floated six months, but Pelosi and Schumer held firm to their three-month proposal and Trump sided with them, according to people familiar with the meeting.
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, especially in the run-up to the 2018 congressional elections, and it lends added stability to financial markets.
For minority Democrats, whose votes are needed to pass debt ceiling increases, they could potentially use the debt limit vote later in the year as leverage to win concessions on a tax overhaul package that Trump badly wants to advance.
Even though Republicans control the White House and both chambers of Congress, Trump has yet to win passage of any major legislation, with Democrats typically united against him.
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, with the measure now going to the Senate.
STOCKS, DOLLAR RISE
U.S. shares rose and the dollar gained against the safe-haven Japanese yen as word of the deal helped mitigate investor concerns about North Korea and a major hurricane barreling toward Florida. The news also lifted the yield on benchmark 10-year U.S. Treasury notes US10YT=RR after it had fallen to a near 10-month low at 2.054 percent.
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 U.S. credit rating, cause financial turmoil, harm the economy and possibly trigger a recession.
White House legislative director Marc Short said the deal helped "clear the decks" to focus on one of the top priorities for Trump and the Republicans: major tax-cut legislation.
No. 2 Senate Republican John Cornyn said: "This basically kicks the can down the road for three months but does give us time to try to make the case for tax reform and to do other important things."
(Additional reporting by David Sherpardson, Jeff Mason, Roberta Rampton, Amanda Becker, Doina Chiacu, Richard Cowan, James Oliphant and David Morgan; Writing by Will Dunham; Editing by Alistair Bell and Peter Cooney)