A Brooklyn Supreme Court judge has temporarily blocked a plan to build two 16-story rental buildings in Crown Heights, marking a major victory for community activists who spent years fighting the project.

In December, the City Council approved a controversial rezoning that paved the way for a pair of buildings at 40 Crown Street and 931 Carroll Street, both on or near Franklin Avenue. Developers Cornell Realty Management and Carmel Partners are planning to build 518 apartments, of which 140 would be below market rate.

But community members, including a group called Movement to Protect the People led by Alicia Boyd, argued that the project would cast damaging shadows onto the nearby Brooklyn Botanic Garden. The same battle is currently playing out with a yet-to-be-approved project at 960 Franklin Avenue consisting of two 39-story towers and which is even closer to the Botanic Garden.

On Monday, Boyd won a temporary restraining order on the grounds that the Department of City Planning elected not to issue an environmental impact statement, which would have required the city to evaluate a host of possible effects the project would have on the surrounding community, such as air quality, neighborhood character, and socioeconomic conditions. Rather, City Planning concluded that the project would “not result in potentially significant adverse environmental impacts.”

As part of the temporary restraining order, the city is prohibited from issuing any permits to the developers until the parties appear at a court hearing.

John Low-Beer, an attorney who works on land use cases, and George Janes, a New York City planning consultant, said the decision was a rare and surprising triumph for opponents of development and rezonings. Both have worked on major development lawsuits against the city.

“It’s hard to do what they did,” Janes said.

He said that the city has a natural incentive to declare that a project will not have a significant impact on its surroundings, because “it’s a lot faster and cheaper than doing a full environmental review.”

Reached by phone, Boyd declined to comment on the case until her planned press conference at 5 p.m. on Wednesday. She announced the judge’s decision in a press release earlier in the day.

The city’s Law Department and the developers did not immediately respond to requests for comment. City Council member Laurie Cumbo, who represents the neighborhood and was also named in the lawsuit, could not be reached for comment.

The parties are due to report for a court hearing on May 3rd.

Officials at the Brooklyn Botanic Garden did not take a position on the Cornell project, saying that it was farther away and would have less impact on its green space than 960 Franklin. But at the time, opponents of the Cornell plan said that the rezoning would set a precedent for other projects near the Botanic Garden.

The proposed project at 960 Franklin Avenue, which is currently undergoing review, has provoked strong opposition from Garden staff and its members. In February, the city determined that an environmental impact statement is required for the project.

UPDATE: Nick Paolucci, a spokesman for the city's Law Department issued the following statement: "We stand by the city’s review of this project and will defend it in court. This very limited TRO enjoins us from pouring concrete which is many months away. Soil tests are proceeding at the site."