Appeals Court judges blocked the long-stalled plan for a mall on a Citi Field parking lot today, saying that the Bloomberg administration improperly signed off on the plan without seeking the state legislative approval needed when giving away parkland.

Judges for the state's top court ruled 5-1 in favor of the suit brought by local state Sen. Tony Avella, area residents, business owners, and community activists. The mall, backed by the de Blasio and Cuomo administrations, is part of the Willets Point development plan. The original 2008 proposal was for housing where there had been auto repair shops on the east side of Citi Field. It came to include the mall on the parking lot that is technically part of Flushing Meadows Corona Park, thrown in by former mayor Michael Bloomberg to sweeten the deal.

The problem, pointed out by activists and affirmed by the appeals court, is that formally designated parkland is protected under state law, and requires state legislation to be turned into something else. The state authorized the construction of a baseball stadium on the site, but that authorization doesn't cover the construction of a mall, Judge Rowan Wilson wrote for the majority.

"The plain language of the statute does not authorize the proposed construction," Wilson wrote. He said further, "history also unambiguously demonstrates that the Legislature did not authorize the city to do more than enter into agreements for the use of the stadium."

The developers, Related Companies and Mets owners Fred Wilpon and Saul Katz, operating as the Queens Development Group, have donated at least $187,000 to Governor Cuomo and Attorney General Eric Schneiderman, whose office argued in support of the plan, since 2010. A spokeswoman for Schneiderman notes that the representation was at the request of city and state agencies.

Mayor de Blasio's deputy Alicia Glen said in 2015 that she wouldn't have signed off on the project, but the mayor's Law Department reversed course and filed briefs in support of it this spring. The city is calling on the developers to complete the below-market housing component of the complex before the current 2022 deadline.

A spokesman for the Queens Development Group told our pals at DNAinfo that the company is disappointed and that the decision could further delay the environmental cleanup needed to start construction.

"At a time when Queens needs private investment more than ever, the court’s decision disregards the City Council, the local community board and other stakeholders who have already approved the Willets West plan," the spokesman said in a statement. "We are in the process of evaluating our next steps."

The Governor's Office didn't respond to an email seeking comment.

Melissa Grace, a spokeswoman for the Mayor's Office, wrote in a statement, "Our priorities remain the same: jumpstarting the affordable housing, schools, libraries, retail and open space this community was promised. This ruling does not alter the City’s ability to move ahead with a dynamic mixed-use project on Willets East. We’ll determine the best path forward with stakeholders in the coming weeks."