RALEIGH, N.C. — The General Assembly on Wednesday overrode Democratic Gov. Roy Cooper’s veto of a wide-ranging environmental bill that provides a little money — but not enough according to Cooper — to address a little-studied chemical discharged into a river.

Returning to Raleigh for the third time since completing their primary annual work session in June, the Republican-controlled state House and Senate voted separately to approve the measure over Cooper’s objections.

The measure gives $435,000 to help Wilmington-area utilities and the University of North Carolina at Wilmington to help treat and remove the chemical GenX from the Cape Fear River. A Bladen County plant discharged the chemical for years into the river until recently. That public disclosure surprised local residents and raised concerns because there are no federal health standards for the chemical. Officials have said the treated water is safe to drink.

Cooper and his allies complained the funding is insufficient and fails to address the underlying challenges of addressing “emerging contaminants” in drinking water sources. He wanted $2.6 million his agencies requested to beef up water quality experts and permit writers statewide. Cooper also opposed provisions within the measure affecting local landfills and ending a plastic bag ban on the Outer Banks.

Republicans supporting the override said directing the funds to the Wilmington area would actually help clean up drinking water there. Cooper’s veto, if allowed to stand, would block that work, said GOP Rep. Larry Yarborough of Person County, a primary bill sponsor.

The bill “does not take any protections of our rivers and streams away,” Yarborough said before the House’s 70-44 override vote. “The governor’s veto does nothing to affect that situation.” With no debate, the Senate voted 30-9 for the override.

Rep. Deb Butler, a New Hanover County Democrat, said the piecemeal spending in the measure is the wrong approach. Cooper and other Democrats argue that recent Republican budgets have led to the elimination of at least 70 positions in water quality since 2013.

“Protecting drinking water from emerging contaminants will require a statewide solution and families shouldn’t suffer under the illusion that this legislation starts fixing the problem,” Cooper said in a statement after the override.

Republicans say suggestions that spending reductions have contributed to the inability to address GenX are misguided, adding problems originated with state agencies in the 1980s.

Cooper has vetoed 12 bills since taking office in January. With Wednesday’s votes, the legislature had overridden eight of them. Senate leader Phil Berger said his chamber would try to override one of the four pending vetoed measures Thursday. Legislators are using parliamentary maneuvers to address another vetoed bill involving legal notices and newspapers in Guilford County.

The legislature planned to remain in session through at least Thursday to consider other legislation that worked its way through committees late Wednesday.

One of the House measures approved by a committee and heading to the House floor Thursday redraws election districts statewide for trial court judges and local prosecutors. Although GOP legislators argue that the remapping promotes fairness in maps that haven’t seen wholesale changes in 60 years, Democrats and their allies say there are partisan and racial gerrymanders that will benefit Republican candidates.

Dozens of demonstrators opposed to the plan walked the halls of the Legislative Building on Wednesday morning. But criticism was muted in the committee later as amendments addressing some concerns of Democrats were approved.

Still, Senate Republicans aren’t sold on the changes, and Senate leader Phil Berger told colleagues “it is unlikely we will be taking that up” before adjournment. But in a sign that judicial boundaries could be considered in the months ahead, a separate elections bill expected to receive final House and Senate votes Thursday would eliminate primaries for all judicial races — including appeals court races — in 2018 only and delay filing for these candidates from February until June.

“It’s a fluid situation at this point,” said Sen. Ralph Hise, a Mitchell County Republican and negotiator of the bill that cancels judicial primaries.

Attached to that bill are changes that would ease requirements for unaffiliated candidates to run in state and local elections and for political parties to field candidates up and down the ballot. The measure also would lower the threshold that a leading candidate must receive in a primary election to avoid a runoff from more than 40 percent of the vote to 30 percent.