The state Appellate Division’s ruling last week against developers’ plans to build a mega-mall on parkland at Citi Field was a victory for state Sen. Tony Avella and others, but they say the battle is not yet won.

The developers, the Queens Development Group, immediately announced they would appeal, saying, “We strongly disagree with today’s ruling and will be appealing the decision. The community-driven plan is the best way to rejuvenate Willets Point, a neighborhood that has been neglected for decades.

“This decision, which overturns a well-reasoned decision of the New York Supreme Court, blocks a plan that has been embraced by a wide variety of stakeholders from the City Council to civic groups to labor organizations and others.”

The four-judge appellate panel, however, voted unanimously that any alienation or removal of parkland must be authorized by the state Legislature, as per state law. The developers were basing their case on a 1961 administrative code that allowed Shea Stadium to be built.

No reasonable reading of the code, the judges said, either contemplated or gave permission for a shopping mall, unrelated to the stadium, to be built in Flushing Meadows Park.

“The public trust doctrine is clear that any alienation of parkland must be explicitly authorized by the legislature,” the ruling said. “While there is a legislative mandate for use of the park, that mandate does not encompass the use proposed by respondents.”

The development group, made up of the owners of the Mets and The Related Companies, had plans to build Willets West, a 1.4 million-square-foot mall, and parking garage adjacent to Citi Field.

The lawsuit filed by Avella (D-Bayside), the City Club of New York, Queens Civic Congress, members of Willets Point United and nearby residents and business owners challenged the city’s sweetheart deal that gave away 47 acres of parkland to the developers with an estimated worth of $1 billion for $1 to build the mall.

“Today’s decision sends a message loud and clear — our parks are not for sale,” Avella said. “In a city where public land is in short supply, simply handing parkland over is a betrayal of the public trust. The court has affirmed what we have been fighting for all along.”

Last Thursday’s ruling overturns a state Supreme Court decision made last August that said the project is legal. Although the developers can appeal to the state’s highest court, many believe it will be a difficult battle for them.

Geoffrey Croft, president of NYC Park Advocates, said he was pleased with the latest decision, calling the developers’ plans “disgraceful.” He noted that since the ruling was unanimous, the Court of Appeals must first agree to even take the case.

Avella is not so sure that will happen. “The court can say no to hearing the case,” he said by phone on Tuesday. “We’ve always felt that the higher the case goes up, the better chance we have. We’re on very solid ground, especially with the unanimous decision.”

Paul Graziano, one of the plaintiffs and an urban planner from Flushing, said Tuesday that the strong decision by the judges, “is very difficult to overturn; it’s pretty ironclad.”

Graziano added that the developers’ premise that the parkland had to be developed in order for the rest of the Willets Point development to be completed “was proven wrong in this decision. This shows that the taking of public land cannot be used for private gain.”

Avella called it “ridiculous” that they can’t proceed without the mall: “They’ve changed the plans for Willets Point several times. It’s nonsense.”

He noted that the developers hired Judith Kaye, the former chief judge of the state Court of Appeals, to defend their case, but said her argument about economic development just didn’t hold water.

He believes even if the developers try to revamp the project, the alienation of parkland would have to go to the state Legislature for approval. “Taking 47 acres with no replacement is not the kind of thing that is popular in the Legislature, based on similar cases,” Avella added.

Joe Ardizzone, 83, who was born in Willets Point and has lived there all his life, is the last resident of the area. “I’m very happy Avella got it straightened out, but it’s not the end of it,” he said.

Ardizzone believes the project “is totally illegal” and vows to “fight them to the end. They want to get me out, but who are they to say so? It’s stealing my property and not the American way,” he added.

Jerry Antonacci, one of the WPU leaders, said Monday that he thinks the mall plan is dead. “But they may come up with another plan and it’s about a year-long process to appeal the case,” he said. “The chances are slim to overturn all the judges.”

Avella also pointed out that last week’s ruling prevents the developers from doing any outside work at the site without state legislative approval.

The City Council approved a $3 billion redevelopment plan for Willets Point proper in 2008 to clean up the Iron Triangle area populated with used car parts dealers and repair shops.

It wasn’t until 2013 that the developer was named and specific plans announced, many of which were not in the original proposal.

The project also calls for adding a parking lot, building a hotel, shops, restaurants and offices on 126th Street, across from Citi Field, where the repair shops and other businesses are located. That area is not parkland.

Although many of the businesses have been forced by the city to leave, no further action is expected while the court injunction remains in place.