Negotiators in the House and Senate have reached a deal on a bill to fund the government through Dec. 9.

Republicans and Democrats have been arguing for weeks to find a way forward before the Sept. 30 deadline in order to avoid a government shutdown.

Last week, negotiations in the Senate appeared to be at a standstill, with Democrats in both chambers insisting that the most recent Republican offer was not enough.

Both sides were in agreement, however, that whatever bill moved forward would need to keep the government open through mid-December and provide emergency aid to fight Zika. The final bill does both.

The biggest issue leading to gridlock was that an earlier Republican proposal contained aid for flood victims in Louisiana but not for victims of the lead contaminated water in Flint, Mich., as NPR reported last week.

"The question is, they want to put Louisiana in, and we said you can't put Louisiana in unless you put Flint in," Sen. Chuck Schumer, D-N.Y. said last week.

Republicans insisted that the Flint issue was best dealt with in a separate bill — one related to water infrastructure.

The Senate version of that water bill does contain Flint aid, but the House version — up until now — had not. On Tuesday, House leaders finally agreed to add $170 million of assistance for Flint to their water bill. Senate Democratic Leader Harry Reid says he now sees a path forward on the government spending bill.

"I think it should be a good day for the Senate. It should lead to our being able to move forward on this continuing resolution," Reid said. "There are a couple of outstanding issues, but I think they should be able to be resolved."

The end date of December 9 was also a point of contention. At the start of this fall's legislative session, a group of conservative House Republicans were pushing for the spending bill to last six months and expire in March of 2017.

Their reasoning was that a spending bill that lasts only through the middle of December — which is the case in the agreed-upon bill — means lawmakers will have to pass another spending bill before President Obama leaves office.

Those House conservatives are concerned the bill's expiration date will lead to a flurry of last-minute deal making and concessions to the president in the scramble before the holidays.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.