Early-morning light begins to rise in front of the U.S. Capitol on Sept. 6, 2016, in Washington.

Photographer: Mark Wilson/Getty Images

Congress sent President Barack Obama a stopgap spending bill on Wednesday after lawmakers reached a bipartisan deal to keep the government funded through Dec. 9.

In its last vote before the November election, the House passed the measure 342-85 late Wednesday, following a favorable Senate vote earlier in the day. The White House indicated Wednesday that Obama would sign the measure.

The measure, which averts a partial government shutdown, also includes funding to fight the Zika virus and support veterans programs, and assist with flood damage in Louisiana and several other states.

Keep up with the best of Bloomberg Politics.

Get our newsletter daily.

Business

Your guide to the most important business stories of the day, every day.

You will now receive the Business newsletter

Markets

The most important market news of the day. So you can sleep an extra five minutes.

You will now receive the Markets newsletter

Technology

Insights into what you'll be paying for, downloading and plugging in tomorrow and 10 years from now.

You will now receive the Technology newsletter

Pursuits

What to eat, drink, wear and drive – in real life and your dreams.

You will now receive the Pursuits newsletter

Game Plan

The school, work and life hacks you need to get ahead.

You will now receive the Game Plan newsletter

The bill’s passage represents a victory for Democrats, who got much of what they had been demanding for months -- significant funding to combat Zika without barring money going to Planned Parenthood, which provides women’s health services including abortion. They also beat back numerous attempts by Republicans to score policy victories in the bill, including efforts to stop the privatization of internet domain name assignments.

Senate Majority Leader Mitch McConnell of Kentucky, was able to avoid a politically volatile shutdown and allow vulnerable Republican senators to return home to campaign, while House Speaker Paul Ryan of Wisconsin skirted a rebellion by conservative members seeking a six-month stopgap.

The Dec. 9 termination date means that Congress will rejoin the fight over government funding for the rest of the fiscal year after the November election. Whether Hillary Clinton or Donald Trump wins the presidency will largely determine whether spending bills are completed then or if decisions are pushed into next year, a more likely scenario if Trump wins.

Flint Funding

The last significant obstacle to passing the stopgap had been a dispute over funding to address lead-tainted water crisis in Flint, Michigan. Lawmakers authorized the Flint funding in an amendment to a separate water resources bill that the House passed Wednesday evening.

"We feel comfortable here in the Senate," said Senate Minority Leader Harry Reid of Nevada. He added that Democrats received assurances that Flint funding would be fully addressed in the lame-duck session after the November election. The two Democratic senators from Michigan agreed not to block the spending measure, H.R. 5325.

"This is an acceptable compromise," Senator Barbara Mikulski of Maryland, the top Democrat on the Appropriations Committee, said on the chamber’s floor as she urged her colleagues to vote for the measure.

House leaders made clear that they too supported the deal, with lawmakers eager to leave Washington and return home to hit the campaign trail.

Without congressional action, funding for the government would have expired at 11:59 p.m. Friday.

Zika and Opioids

The stopgap measure includes $1.1 billion in funding to fight the Zika virus, $500 million in flood relief and $37 million to combat opioid abuse. Republican leaders dropped House provisions on Planned Parenthood and other issues opposed by Democrats.

The veterans portion of the bill includes a $2.9 billion increase over fiscal 2016, a fact touted by its author, Republican Senator Mark Kirk of Illinois, who faces the toughest re-election fight this year. The funding was included after Republicans agreed to Democratic demands to provide money for in vitro fertilization treatments for veterans for the first time.

Reid had objected to McConnell continuing a provision in current law that prohibits the Securities and Exchange Commission from requiring corporations to disclose their political spending.

"The Securities and Exchange Commission will be powerless to tell corporations that they have to disclose their campaign contributions," Reid said. "They have to disclose everything else to their shareholders, but not that."

But Democrats decided not to hold up action over that issue.

Big business also failed in quest to jump-start the U.S. Export-Import Bank, whose board has been stymied due to a lack of a quorum.

Drinking Water

The Flint drinking water crisis was a bigger battle. Many House Republicans say drinking water is an issue better left to states and localities to address.

"What happens is that we all want to run home to say the federal government should be the backstop for every decision that happens at a state and local level. And I think that is a dangerous precedent, said Representative Mark Meadows, a North Carolina Republican.

But the issue has taken on greater prominence with the presidential election, particularly after Trump made a rocky visit to Flint earlier this month.

The Senate passed a separate measure that includes $220 million for Flint and other communities affected by lead, which now goes to a conference committee to reconcile differences with a House version of the measure. McConnell omitted the funding from his own stopgap spending bill last week after bipartisan negotiations broke down.

Flint funding was omitted from an earlier version of the House water bill. Republican leaders on Monday night teed up more than two dozen amendments for the House floor while blocking Democrats from offering one on Flint.

Late Tuesday, the House Rules Committee reversed course, allowing an amendment that would authorize $170 million that would help Flint. That decision cleared the way for Democrats to support the stopgap spending bill.