President Donald Trump signed the deal into law later Friday morning.
House Speaker Paul Ryan called the deal's passage a "great victory" for the military.
With bipartisan support in the Senate, the plan should pass easily.
"I don't advocate for shutting the government down, but neither do I advocate for keeping it open, and borrowing a million dollars a minute", Paul added.
The brief shutdown in Washington came at a sensitive time for financial markets.
The Trump administration signaled it expected the shutdown to be short, calling it a "lapse".
"I am pleased to announce that our bipartisan, bicameral negotiations on defense spending and other priorities have yielded a significant agreement", McConnell said.
On Thursday, House Speaker Paul Ryan gave his full support to the bill to try to rally others in chamber to also vote yes - saying the military is at risk without the money, while acknowledging the deal includes partisan compromises and isn't ideal.
In the end, the votes were there - but that didn't prevent heightened drama leading up to the vote.
Many Democrats support the budget deal, but were unhappy with the compromise because it doesn't tackle immigration - specifically addressing the plight of DREAMers, including the roughly 700,000 immigrants who are in the USA illegally after being brought to the country as children and who are enrolled in the Deferred Action for Childhood Arrivals (DACA) program, which is set to expire on March 5.
House Minority Leader Nancy Pelosi tried and failed to use the moment to secure a promise for a separate vote on immigration. "I would argue that it's time to vote".
The deal would clear the deck for Congress.
Democrats have thus far not been willing to take Trump up on the deal.
Democrats also experienced internal divisions, with liberals upset the measures were not tied to any plans to assist the "Dreamer" immigrants, who were brought to the country illegally as children. "I feel very good about Republicans", he said. "This is not what the American people sent us here to do". "Their patriotism, their perseverance, their optimism are an inspiration that stirs the conscience of our entire nation".
WASHINGTON, D.C.: The US Senate passed a critical stopgap spending bill early Friday as congressional leaders scrambled to minimize the effects of a government shutdown that began after an hours-long delay forced Congress to miss a midnight deadline.
When faced with the question of whether to boost military or domestic spending, Capitol legislators have their answer.
Officials at the White House say the deal would also increase the debt ceiling until March 2019.
The bill also keeps the government running until late March.
It incorporates a major budget deal reached last week between Senate leaders on both sides of the political aisle. Rand Paul. The Senate vote passed 71-28.
Paul ran against Trump in the 2016 presidential primary, drawing attention to the president's multiple bankruptcies as proof of his lack of a commitment to fiscal conservatism.
"There is probably a lot of blame to go around for the Republicans who are advocating for this debt", Paul said to CNN's Erin Burnett OutFront.
Democrats on the House panel drafted their memo to counter claims in a document released last week by Republicans, led by committee chairman Rep. Devin Nunes of California. They supported a short-term spending bill that didn't address immigration because McConnell promised he would allow debate on immigration legislation.
The Senate's Majority whip sounded a bit frustrated by the holdup. Sen. In his attempt to sway Paul to relent, Texas Sen. "Once we get this budget agreement done ... we will focus on bringing that debate to this floor and finding a solution".
Cornyn pointed out, "It takes unanimous consent to get an amendment". He doesn't need consent to do that. "And, you know, as much as we've wanted certainty for the military, there have been a number of their members that wanted it as well, and we found that we were able to give them that".