The bill will fund the government through January 15, 2014 and averts default through February 7, during which time it can work toward a long-term budget agreement that prevents these frequent crisis.
The US President, Barack Obama, said he would sign the legislation immediately after it is passed by the House of Representatives.
"The Senate has now voted to approve this agreement, and Democrats and Republicans in the House still have an important vote to take, but I want to thank the leaders of both parties for getting us to this point. Once this agreement arrives on my desk, I will sign it immediately," Obama told reporters at the White House.
"We'll begin reopening our government immediately, and we can begin to lift this cloud of uncertainty and unease from our businesses and from the American people," he said.
Also Read
The US President said he has got some thoughts about how they can move forward in the remainder of the year, stay focused on the job at hand and win the trust of Americans lost during the crisis.
"Because there is a lot of work ahead of us, including our need to earn back the trust of the American people that has been lost over the last few weeks. And we can begin to do that by addressing the real issues that they care about," he said.
"I am eager to work with anybody -- Democrat or Republican, House or Senate members -- on any idea that will grow our economy, create new jobs, strengthen the middle class, and get our fiscal house in order for the long term," he said.
"I've never believed that Democrats have a monopoly on good ideas. And despite the differences over the issue of shutting down our government, I'm convinced that Democrats and Republicans can work together to make progress for America," said the US President.
Obama said once these issues are resolved, he would like to move forward on immigration and farm legislation.
And with the shutdown behind us and budget committees forming, we now have an opportunity to focus on a sensible budget that is responsible, that is fair, and that helps hardworking people all across this country," Obama said.