JACKSON  (AP) — Environmental groups have filed suit over Six Flags Great Adventure's plan to cut nearly 19,000 trees to build a 90-acre solar farm.

Main entrance to Six Flags Great Adventure in Jackson (Dan Alexander, Townsquare Media NJ)

The groups claim the Jackson theme park  is violating the state's municipal land use law. They say the plan would be harmful to the Barnegat Bay watershed.

The groups say the amusement park's parking lot and buildings would be a more appropriate location for a solar farm.

In a statement, Janet Tauro of Clean Water Action said it's illogical to destroy the forest to combat climate change. Other groups in the lawsuit are Crosswicks Creek-Doctors Creek Watershed Association, the New Jersey Conservation Foundation and Save Barnegat Bay.

Six Flags has said the facility would reduce carbon dioxide emissions by nearly 24 times what the undisturbed forest is capable of removing on its own. Park President John Fitzgerald says if the trees in question were left in place, they would only remove about 9,600 tons of carbon dioxide so there would be a net gain in terms of the overall amount present in the environment. He says once the solar farm is completed and operational, it will provide almost all of the park's power which he says would not be possible using solar panels in parking lots or on rooftops due to the lack of space.

The park has also pledged to replant nearly 26,000 trees.

Megan Madison contributed to this report

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)