The House approved a one-week spending bill at about 12:39 a.m. Saturday morning to avoid a government shutdown.

The bill cuts $2 billion from discretionary spending and gives Congress more time to finalize a fiscal 2011 spending deal that Republicans and Democrats agreed to late Friday evening.

The short-term stopgap bill was approved by a 348-70 vote in which just 28 Republicans and 42 Democrats opposed passage. The Senate had approved the same language by unanimous consent less than 90 minutes earlier.

With approval from both chambers, the bill headed to the White House, where President Obama was expected to sign it promptly to keep the government funded through April 15.

Party leaders on both sides seemed pleased with the agreement. Senate Majority Leader Harry ReidHarry Mason ReidGOP poised to advance rules change to speed up Trump nominees Dems walk tightrope on Pompeo nomination The Memo: Teens rankle the right with gun activism MORE (D-Nev.) said the process had been "grueling," but said members had "not worked to this late hour for the drama, but because it's been hard."

"There have been many tough choices but tough choices are what this job is all about," Reid said. "This is historic what we have done … what we have done has been difficult but important for this country."

House Appropriations Committee Chairman Hal Rogers (R-Ky.) hailed the agreement as one that would allow "the largest non-defense spending cut in the history of the nation."

Appropriations ranking member Norm Dicks (D-Wash.) also supported the decision to pass what he said was essentially a "clean" continuing resolution.

"It is basically a clean CR, in the sense of, there's no ideologically driven language," Dicks said. "I think this is acceptable."

Possible GOP presidential candidate and Tea Party darling Rep. Michele BachmannMichele Marie BachmannBachmann won't run for Franken's Senate seat because she did not hear a 'call from God' Billboard from ‘God’ tells Michele Bachmann not to run for Senate Pawlenty opts out of Senate run in Minnesota MORE (R-Minn.) was among the dissenters.

In a statement released shortly after the vote, Bachmann said she was protesting the overall agreement on the long-term funding measure, which she called a "disappointment for me and millions of Americans" who, she said, "expected" $61 billion in cuts from current spending levels.

House and Senate negotiators reached an eleventh-hour agreement to cut $39 billion in spending from current levels that would allow for an up-or-down vote on controversial policy riders in the Senate. Funding for Planned Parenthood and the president's healthcare law were among the policy riders approved in a previous House version of the spending bill that the Senate will vote on next week.

However, Bachmann said that deal was unsatisfactory.

“We’ve been asked to settle for $39 billion in cuts, even as we continue to fund Planned Parenthood and the implementation of ObamaCare. Sadly, we’re missing the mandate given us by voters last November, and for that reason I voted against the Continuing Resolution," Bachmann said in her statement.

Under the full fiscal 2011 deal reached, $39.5 billion would be cut from 2010 levels, about two-thirds of the $61 billion cut passed by the House earlier this year. The one-week spending bill approved early Saturday cuts the first $2 billion of the $39.5 billion, and the rest will be cut in the longer-term bill to be taken up next week.

According to the Senate Appropriations Committee, most of the $2 billion in cuts in the one-week bill come from a $1.5 billion reduction in the Federal Railroad Administration's High Speed and Intercity Passenger Rail program. Another $220 million was cut from the Department of Housing and Urban Development's Community Development Fund.

A summary of the cuts is provided here.

For most of the day, the two parties were split on funding for Title X, the federal women's health program. While Republicans were looking to give Title X funds to states to distribute as they see fit, Democrats were arguing that this would undermine women's health.

Democrats also see the Republican demand as a way of attacking Planned Parenthood, which receives a significant portion of Title X money and provides abortion services, even though the group is prohibited by law from using federal funds for those services.

Late Friday night, Assistant Senate Majority Leader Dick DurbinRichard (Dick) Joseph DurbinTo succeed in Syria, Democrats should not resist Trump policy Hannity, Kimmel, Farrow among Time's '100 Most Influential' The Hill's Morning Report: 200 Days to the Election MORE (D-Ill.) said he believed House Speaker John BoehnerJohn Andrew BoehnerA warning to Ryan’s successor: The Speakership is no cakewalk With Ryan out, let’s blow up the process for selecting the next Speaker Race for Republican Speaker rare chance to unify party for election MORE (R-Ohio) was willing to accept some form of compromise on this issue.

Molly K. Hooper contributed. Updated at 1:29 a.m.