* Senate, House approve stopgap funding and budget bill
* Trump signs legislation into law
* Shutdown caused by Senator Rand Paul's deficit dissent (Adds budget details, stock update)
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 expected to push budget deficits into the $1 trillion-a-year zone.
The bill was approved by a wide margin in the Senate and 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 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 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.
Friday's deal allows for $165 billion in additional defense spending over two years, helping Trump deliver on his promise to boost the military.
That won over many Republicans, but some were furious over the $131 billion extra allocated for non-military spending, including health and infrastructure.
The White House will amend its upcoming budget request to take into account the higher spending levels in the deal that passed into law on Friday, a senior official in the Office of Management and Budget said.
The White House budget proposal, to be released on Monday, projects that the economy will grow about 3 percent over the next decade, with a slightly larger near-term boost of 3.2 percent next year before declining to 3 percent in 2021 and 2.8 percent in 2026, the Wall Street Journal reported.
Compared with last year, the administration projects lower inflation over the coming decade and lower government borrowing expenses, the Journal reported. The forecast assumes the 10-year Treasury yield will average 2.6 percent this year and 3.1 percent next year before rising to 3.7 percent by early next decade, the newspaper reported.
None of the added spending in the newly approved budget 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.
STOCK MARKET SWINGS
The brief shutdown came at a sensitive time for financial markets, with world stock markets diving in the past week. 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.
Wall Street's main stock indexes climbed more than 1 percent on Friday, giving investors some solace after a week of huge swings that shook the market out of months of calm.
Republican Senator Rand Paul, objecting to deficit spending in the bill, launched a nine-hour, on-again, off-again protest and floor speech late on Thursday that delayed passage of the deal past midnight, when funding for the government ran out. He had harsh words for his own party.
"Now we have Republicans hand in hand with Democrats offering us trillion-dollar deficits," Paul 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."
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, mostly from Mexico. Trump said in September that 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 Friday's vote that he would push ahead for a deal.
(Additional reporting by Eric Beech, Makini Brice, Katanga Johnson and Doina Chiacu; Writing by Kevin Drawbaugh; Editing by Frances Kerry, Andrew Hay and Daniel Wallis)