Superman, powered in DC Comics by the yellow sun of the Earth, will now be powered by that same sun at Six Flags Great Adventure in New Jersey.

Six Flags Great Adventure has reached a deal with environmental groups that will allow it to proceed with a massive solar array to power the park, according to the company. The solar array would power a collection of superhero rides including Batman: The Ride and Superman: Ultimate Flight, a 106-foot-tall steel roller coaster.

A coalition of environmental groups sued Great Adventure over its 2015 plan that would have clear-cut an estimated 18,000 trees, impacting nearly 100 acres, in order to build a solar farm.  The farm would produce 23.5 megawatts of power on the company's Jackson Township property.  That's enough to power 3,650 homes.  By comparison, Lincoln Financial Field in Philadelphia produces about 3 megawatts from its 11,000 solar panels.

Great Adventure had local approval, and a Superior Court judge in Ocean County dismissed the environmentalists' suit, but the groups appealed. The Sierra Club was part of the original lawsuit, along with Clean Water Action, the New Jersey Conservation Foundation, Save Barnegat Bay, Environment New Jersey, and the Crosswicks-Doctors Creek Watershed Association.

Jeff Tittel, the New Jersey Sierra Club's director, said the deal was struck last week.  It calls for the original solar plan on a wooded tract east of the safari park to be reduced in size to about 40 acres.  So, almost half of the solar panels once planned for a sensitive area of pine forest will now be installed in a parking lot or other already-developed surfaces.  Those panels will also be more efficient than in the original plan.

Kristen Siebeneicher Fitzgerald, a Great Adventure spokeswoman, said the new plan required the company to reconfigure the solar array by KDC Solar to include solar carports over selected parking lots and 40 acres of ground-mounted solar panels.

Additionally, Great Adventure will deed-restrict 213 acres so nearby land won't be developed.

Overall, Great Adventure says, it will become the largest net metered solar project in New Jersey and keep with Gov. Murphy's pledge to support renewable energy. Construction will begin in March and the facility will be fully operational by the end of 2019.

In an email, Six Flags Entertainment Corp. president John Winkler said the company "is proud to become the world's first solar-powered theme park, and this project represents a giant step toward becoming a net-zero carbon facility. We are pleased that we were able to come to a satisfactory settlement for all parties involved."

The company says the 45-year-old park has strived to be environmentally conscious.  It says it has cared for 70 different species of animals and recycles more than 60 percent of its waste, "including manure, paper, plastic, wood and mixed garbage."

Environmentalists were pleased with the result of the settlement.

"At the end of the day, we'll get 253 acres preserved, or six times less than what would be cut down," Tittel said. "So it's a very good deal. It was a great adventure getting to this point.  It was a big battle and lots of back and forth."