WASHINGTON — The House easily approved an election-year plan Wednesday to provide $170 million to help Flint, Michigan, rebuild its lead-poisoned water system, as Congress moved toward addressing a public health catastrophe that became an acrimonious partisan dispute.

Wednesday’s vote was 284-141 and came nearly a year after Michigan officials declared a health emergency in the poverty-stricken city. The tally came as lawmakers rushed to finish last-minute business and leave town until after the November elections.

“What happened in Flint was a failure of government at every level,” said Rep. Dan Kildee, D-Mich., who is from the city and has been a leader in the effort to help it. “We’ve just waited an awful long time for this.”

All 183 voting Democrats supported the Flint provision, while Republicans tilted against it by 141-101.

Federal, state and local officials blamed each other for the causing the contamination, an effort in Congress to approve aid bogged down and Democrats angrily accused Republicans of dragging their feet on the issue. A chief reason for the delay was conservative Sen. Mike Lee, R-Utah, who objected to using federal money to address the problem.

A breakthrough occurred two weeks ago, when the Senate approved $220 million for Flint and other communities with lead contamination problems. The Senate included that money in a wide-ranging water projects bill.

The effort went nowhere in the Republican-run House until Speaker Paul Ryan, R-Wis., and Minority Leader Nancy Pelosi, D-Calif., struck a deal late Tuesday. Under that agreement, a plan to provide the Flint aid was included in a wide-ranging water projects bill, which the House approved 399-25.

Actual money to help Flint will have to be provided in separate legislation after Congress returns in November. GOP leaders pledged to craft legislation that will provide the money.

Because the Flint money was stalled, Senate Democrats voted Tuesday to derail a must-pass bill to avert a government shutdown this weekend. They relented and the Senate approved the bill financing federal agencies after Ryan and Pelosi reached their agreement on Flint.

Flint’s problems began in 2014, when the city switched its drinking water supply to the Flint River to save money.

That ended up contaminating the system with lead from old pipes. Officials have said up to 12,000 children have been exposed to lead in the water.

More than half of Flint’s 100,000 residents are black. Earlier this week, Kildee said during House debate that GOP leaders “don’t see American citizens” when they look at the people of Flint.

That prompted an angry response from Rep. Rob Woodall, R-Ga.: “We owe each other better than that. That kind of vitriol is not going to get us to where I know you and I both want to go.”