* Senate, House approve stopgap funding and budget bill
* Trump signs legislation into law
* Shutdown caused by Senator Rand Paul's deficit dissent (Adds Trump comments on Twitter, government reopening)
WASHINGTON, Feb 9 (Reuters) - A brief U.S. government shutdown ended on Friday after Congress passed and President Donald Trump signed into law a wide-ranging deal that is expected to push budget deficits into the $1 trillion-a-year zone.
The bill was approved by a wide margin in the Senate and it survived a rebellion of 67 conservative Republicans in the House of Representatives thanks to the support of some Democrats. Those conservatives were mainly angry about non-military spending increases.
Trump's signature brought an end to a partial government shutdown - or closure of federal agencies - that had been triggered in the early hours of Friday as Congress was still debating the budget deal.
It was the second shutdown this year under the Republican-controlled Congress and Trump, who played little role in attempts by party leaders this week to end months of fiscal squabbling.
In a Twitter post that acknowledged the misgivings of fiscal conservatives, the Republican president said after signing the measure, "Without more Republicans in Congress, we were forced to increase spending on things we do not like or want in order to finally, after many years of depletion, take care of our Military" with additional funding.
Trump also wrote that negotiations will "start now!" on an immigration measure that he and Democrats have been battling over for months.
The deal, the fifth temporary government funding measure for the fiscal year that began Oct. 1, replenishes federal coffers until March 23, giving lawmakers more time to write a full-year budget.
It also extends the U.S. government's borrowing authority until March 2019, sparing Washington politicians difficult votes on debt and deficits until after mid-term congressional elections in November.
The Republican Party was once known for fiscal conservatism, but congressional Republicans and Trump are now quickly expanding the U.S. budget deficit and its $20 trillion national debt. Their sweeping tax overhaul bill approved in December will add an estimated $1.5 trillion to the national debt over 10 years.
Nearly $300 billion in new spending that is included in the bill approved on Friday will mean the annual budget deficit will exceed $1 trillion in 2019, said the Committee for a Responsible Federal Budget, a private fiscal policy watchdog group in Washington.
Friday's budget deal allows for $165 billion in additional defense spending over two years, which will help Trump deliver on his promise to boost the military.
That won over many Republicans, but some were furious over the $131 billion extra made available for non-military spending, including health and infrastructure.
None of the added spending will be offset by budget savings elsewhere or revenue increases, relying instead on government borrowing. There also is no offset reduction for nearly $90 billion in new disaster aid for U.S. states and territories ravaged by hurricanes or wildfires last year.
The U.S. Office of Personnel Management sent a notice to millions of federal employees Friday morning after Trump signed the measure, telling them to report to work.
The brief shutdown in Washington came at a sensitive time for financial markets, with world stock markets diving in the past week. U.S. stocks plunged on Thursday on heavy volume, throwing off course a nearly nine-year bull run.
U.S. stocks opened sharply higher early on Friday morning even as several indexes remained on course for a steep weekly loss. Markets barely flinched at the last shutdown in January, but that was before a selloff that started on Jan. 30 amid concerns about inflation and higher interest rates.
Republican Senator Rand Paul, objecting to deficit spending in the bill, engaged in a nine-hour, on-again, off-again protest and floor speech late on Thursday that delayed passage of the deal past the midnight hour, when funding for the government officially ran out. Paul had harsh words for his own party.
"Now we have Republicans hand in hand with Democrats offering us trillion-dollar deficits," he said. "I can't ... in good faith, just look the other way because my party is now complicit in the deficits. Really who is to blame? Both parties."
His dissent forced the brief government shutdown, underscoring the persistent inability of Congress and Trump to deal efficiently with Washington's fiscal obligation to keep the government open.
"Republican majorities in the House and Senate have turned the process into an embarrassing spectacle, running from one crisis directly into the next," Democratic Representative Nita Lowey said before the House vote.
Republican Representative Kristi Noem told Reuters she voted against the bill because it raises non-defense spending and extends the federal borrowing authority.
"To increase domestic spending and raise the debt ceiling was coupling two very bad policy decisions and with no reforms tied to it. It was very disappointing," she said.
House Democratic leader Nancy Pelosi and others in her party had opposed the bill because Republican House leaders would not guarantee her a debate later on bipartisan steps to protect about 700,000 "Dreamer" immigrants from deportation.
These young adults were brought illegally to the country as children years ago, mostly from Mexico. Trump said in September he would end by March 5 former Democratic President Barack Obama's Deferred Action for Childhood Arrivals (DACA) program that protects the Dreamers from deportation.
Trump urged Congress to act before then. Senate Republicans have promised to hold a separate debate on immigration this month.
House Speaker Paul Ryan had not offered Pelosi an equivalent guarantee in the House, although he said in a speech before the vote on Friday that he would push ahead for a deal.
"My commitment to working together on an immigration measure that we can make law is a sincere commitment," he said. "We will solve this DACA problem."
But Pelosi said Ryan's words fell short, accusing him of not having "the courage to lift the shadow of fear from the lives of" Dreamers who face the prospect of deportation.
(Additional reporting by Eric Beech, Makini Brice, Katanga Johnson and Doina Chiacu; Writing by Kevin Drawbaugh; Editing by Matthew Mpoke Bigg, Bill Trott and Frances Kerry)