The bill, now awaiting President Donald Trump's signature, passed 67-28 on Thursday, with 23 Republicans and five Democrats voting against it. The bill had passed 284-149 in the House earlier, reports Xinhua news agency.
"Budget Deal is phenomenal for our great military, our vets (veterans), and jobs, jobs, jobs! Two year deal gets us past the Election. Go for it Republicans, there is always plenty of time to cut," Trump tweeted ahead of the Senate voting.
Maya MacGuineas, President of the Committee for a Responsible Federal Budget, a non-partisan watchdog group, said in a statement that "today's budget vote caps a shameful period of fiscal recklessness in Washington that is unprecedented in the context of our current fiscal state".
Congress and the President have added $4.1 trillion to the debt since Trump took office, MacGuineas said.
"As a result, deficits are more than double what they would have been without fiscally irresponsible tax cuts and spending increases.
"With the national debt rising to historic levels soon to overtake the size of our entire economy and beyond and with our largest programs, Social Security and Medicare, spinning toward insolvency, our nation's answer is to make the problem worse at every turn," she added.
The agreement, struck between the White House and Congressional leaders, suspends the federal debt ceiling until July 31, 2021, and raise overall spending levels by $320 billion above the limits set in the Budget Control Act of 2011, which established strict spending caps and stipulated automatic across-the-board spending cuts.
It will lift the budget cap for discretionary spending to $1.37 trillion in 2020 and $1.375 trillion in 2021, expanding defence outlays, demanded by Republicans, and boosting domestic spending, including health care for veterans, sought by Democrats.
The White House has projected a $1 trillion budget deficit for the fiscal year 2019, the highest since 2012, Office of Management and Budget said in its recently released Mid-Session Review.
The federal budget deficit reached $747 billion in the first nine months of the fiscal year, up 23 per cent from the previous year.
The debt ceiling was previously set at $20.5 trillion, and expired on March 1 this year.
Since then, US Treasury Secretary Steven Mnuchin has urged congressional leaders to raise the federal debt limit as the Treasury Department began accounting maneuvers to avoid a default.
House lawmakers left for the summer break on July 26, and the Senate is set to resume on Friday.
In an earlier statement, MacGuineas had urged members of Congress to "cancel their summer recess and return to the negotiating table for a better deal".
( With inputs from IANS )