Getting dragged into one of the most contentious pollution cleanup cases in New Jersey history is costing dozens of municipalities millions in legal fees, with no end in sight.

The Legislature is moving to eliminate the towns’ liability for cleaning up hazardous waste. But the effort is opposed by an unlikely partnership between some of the state’s biggest business groups and environmental organizations, an alliance that did not escape notice of lawmakers.

“Right now, from what I understand, Jeff Tittel [director of the New Jersey Sierra Club] and the Chemistry Industry Council are actually on the same side of the issue,’’ said Assemblywoman Holly Schepisi (R-Bergen). “Maybe the Mayans were correct and the world is coming to an end.’’

The environmentalists and business interests are united in lobbying against a bill (A-3128) that would remove sewage, wastewater, and sludge from the list of hazardous substances specified by the New Jersey Spill Control and Compensation Act.

It is a step proponents say would help extricate more than 75 communities from being responsible for the cleanup of massive dioxin pollution buried in the sediments of the Passaic River, one of the state’s most notorious Superfund toxic waste sites.

The bill cleared the Assembly Environment and Solid Waste Committee last week in a vote split along partisan lines, with the two Republicans on the panel voting against the measure.

The dioxin problems in the Passaic River date back 30 years, when the state Department of Environmental Protection discovered unsafe levels of the chemical at the former Diamond Shamrock Corp. plant in Newark, a manufacturer of Agent Orange, a defoliant used in the Vietnam war.

Diamond Shamrock was bought out by Maxus Energy, which later merged with Occidental Chemical Company. The Newark manufacturing site at 80 Lister Ave. is now part of a newly formed subsidiary called Tierra Solutions.

Both Maxus and Tierra are being held responsible for a cleanup projected to cost as much as $4 billion, but the two companies have dragged many municipalities, which either discharged directly into the river or through regional sewerage authorities, into the remediation effort.

The extensive litigation is taking a toll on the towns, according to Assemblyman John McKeon (D-Essex), the sponsor of the bill. He said that the legal action, begun in 2005 by the DEP, is costing tens of millions of dollars. In Maplewood alone, the legal costs amounted to a quarter of a million of dollars last year, McKeon said.

Besides Maplewood, many other communities in Essex, Union, Middlesex, and Passaic counties have been sucked into the litigation. “It’s costing them millions of dollars,’’ said Sheldon Lipke, a former chief operating officer of the Passaic Valley Sewerage Commission (PVSC) and now a consultant.

Opponents of the bill argued it is far too broad, affording sewage treatment plants across-the-board protection from any spills or discharges that might occur during their normal course of business.

“I’m all for reducing costs for municipalities,’’ said Michael Pisauro, an attorney for the New Jersey Environmental Lobby. “I’m always concerned when we take a tool away to protect the environment.’’

In recent years, wastewater treatment facilities have become the primary source of pollutants in the state’s waterways, according to Steve Picco, an attorney for the Chemistry Industry Council of New Jersey.

“Every time you clean a paint brush over a sink, it goes to your sewage authority,’’ Picco said, a practice that delivers heavy metals and volatile organic compounds into the plant.

Perhaps, more importantly, even if the state eliminates liability under its spill control law, the polluters who dragged the towns into the litigation will seek to pull them back under federal pollution laws, Picco said. “It’s not going to work,’’ he predicted of the bill.

McKeon disputed arguments made by opponents.

“This does nothing at all to denigrate current environmental regulations,’’ he said. “Property taxpayers have been overburdened enough by the strategic addition of them as responsible parties [polluters] and they shouldn’t have to pay an additional dime.’’

The Sierra Club’s Tittel argued that the bill needs to be narrowed to just this one case, the dioxin litigation. Otherwise, authorities, such as PVSC, would be held harmless for the billions of gallons of raw sewage that flowed into Newark Bay after Hurricane Sandy.

“Don’t make it so broad that it’s going to cause more problems later,’’ Tittel said.

Michael Egenton, a senior vice president of the New Jersey State Chamber of Commerce, agreed. “You are setting a bad precedent for cleanups in the state,’’ he told the committee.