(Adds first name and title of House Democratic leader Nancy Pelosi in paragraph 17)
* Plan also would increase U.S. debt ceiling
* Bipartisan agreement needs approval in House and Senate
WASHINGTON, Feb 7 (Reuters) - The U.S. Senate, in a rare display of bipartisanship, on Wednesday reached a two-year budget deal to raise federal spending by almost $300 billion, in an attempt to end the kind of squabbling over fiscal issues that has plagued Washington for years.
The agreement, announced by both the Republican and Democratic leaders of the Senate, would lift caps on defense funding and some domestic government spending. Along with President Donald Trump's tax cuts approved by Congress in December, the new round of spending would further add to the bulging federal deficit.
"This bill is the product of extensive negotiations among congressional leaders and the White House," Senate Majority Leader Mitch McConnell, a Republican, said on the Senate floor. "We worked hard to find common ground and remained focused on serving the American people."
The plan will need to be passed in the House of Representatives and the Senate, both controlled by Trump's fellow Republicans, before going to the president to sign.
But House Democrats have warned that they will not back the deal unless Republican Speaker Paul Ryan promises to advance separate legislation on immigration policy.
Chuck Schumer, the leader of the Senate Democrats, said the deal should break the cycle of partisan fights over spending.
"After months of fiscal brinkmanship, this budget deal is the first real sprout of bipartisanship. And it should break the long cycle of spending crises that have snarled this Congress and hampered our middle class," Schumer said.
The higher defense spending should allow Trump to make good on a campaign promise for a U.S. military build-up.
The White House said the deal also includes an extension, until March 2019, of the government's debt ceiling. The Treasury Department has been warning that without an extension in borrowing authority from Congress, the government would run out of borrowing options in the first half of March.
The agreement also provides funds for disaster relief, infrastructure and programs addressing opioid abuse, the Senate leaders said.
White House legislative affairs director Marc Short said the deal would raise spending by "just shy" of $300 billion. A senior congressional aide said this would not be offset by any spending cuts or new tax revenue, meaning an increase in the federal deficit.
A congressional source familiar with the agreement said it would increase non-defense spending by $131 billion and include $20 billion for infrastructure spending. It also would extend funding for the Children's Health Insurance Program (CHIP) for 10 years instead of the current six, the source added.
Passage of the plan would ease the brinkmanship over spending that roils Washington so regularly that financial markets barely flinch anymore at the threat of a government shutdown.
Aside from the two-year deal, lawmakers were also trying to reach agreement by Thursday to avoid a shutdown and fund the government until March 23.
If that fails, the U.S. government would suffer its second shutdown this year, after a partisan standoff over U.S. immigration policy led to a three-day partial shutdown last month.
Immigration again emerged as a possible point of contention, putting the budget deal in jeopardy. House Democratic leader Nancy Pelosi said she would oppose the accord unless Ryan promises to advance legislation to protect hundreds of thousands of young adult immigrants, known as "Dreamers," brought to the United States illegally as children.
Republicans are eager to keep spending and immigration separate. Trump threatened on Tuesday to upend budget talks by saying he would welcome a government shutdown if Congress were not able to agree to changes in immigration law that he said would prevent criminals from entering the country.
January's shutdown came after Democrats sought to have a spending bill include protections for the Dreamers that Trump has rescinded effective in March.
(Additional reporting by David Morgan, Susan Heavey and Doina Chiacu; Writing by Alistair Bell; Editing by Will Dunham)