* Senate, House approve stopgap funding and budget bill
* Trump to sign the bill on Friday morning
* Shutdown caused by Senator Rand Paul's deficit dissent (Updates with Trump signing bill; adds details)
WASHINGTON, Feb 9 (Reuters) - The U.S. Congress ended a brief government shutdown on Friday by reaching a wide-ranging deal that is expected to push budget deficits into the $1 trillion-a-year zone.
The bill passed 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.
President Donald Trump signed the measure into law on Friday morning, ending a government shutdown that began just after midnight, when 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.
The deal is the fifth temporary government funding measure for the fiscal year that began Oct. 1 and 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.
Once known as the party of fiscal conservatives, the 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 ensure 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 that will help Trump deliver on his promise to rebuild the military.
That won over many Republicans but some were still 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.
PRESSURE ON MARKETS
The brief shutdown in Washington came at a sensitive time for financial markets. Stocks plunged on Thursday on heavy volume, throwing off course a nearly nine-year bull run. The S&P 500 slumped 3.8 percent.
Markets barely flinched at the last shutdown in January, but that was before a dizzying 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. He 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 most basic fiscal obligation of keeping 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," said Democratic Representative Nita Lowey prior to the House vote.
Republican Representative Kristi Noem told Reuters she voted against the bill because it increases non-defense spending and raises the federal debt ceiling.
"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 steps to protect about 700,000 "Dreamer" immigrants from deportation.
These young people 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 pledged to hold a separate immigration debate this month.
House Speaker Paul Ryan had not offered Pelosi an equivalent promise 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.
Minutes after midnight, when the short-lived shutdown began, the U.S. Office of Personnel Management sent a notice to millions of federal employees telling them to check with their agencies on whether they should report to work on Friday.
(Additional reporting by Eric Beech, Makini Brice, Katanga Johnson and Doina Chiacu; Writing by Kevin Drawbaugh; Editing by Matthew Mpoke Bigg and Bill Trott)