Under a long-awaited legal settlement reached last week between Mayor Michael Bloomberg and State Attorney General Elliot Spitzer, the city more than quadrupled the number of permanent community gardens around the boroughs.

But by also putting in motion the creation of thousands of units of housing, some neighborhoods with little green space outside of their vegetable patches and flowerbeds discovered they could soon lose a chunk of the only parks they have.

“We took a big hit,” said Justine Roper of the Brownsville Garden Coalition, whose community could lose up to 23 of its 42 gardens, including nine that are on the list for development without review. “Some of the gardens they decided to preserve are really just weedy lots, while a lot of the other ones in our coalition are very active. What made the city decide to take those?” she wonders.

Under the agreement, the 198 gardens will be either transferred to the Parks Department, where they would be managed in concert with the city’s Green Thumb program, or offered for purchase by a nonprofit land trust for a “nominal sum.” The city also gave additional protections to 193 gardens that are currently under the jurisdiction of the Parks Department, the Department of Education and other city agencies.

This settlement brings the total number of gardens citywide that could become permanent to 496. (In 1999, the city sold 105 gardens to the Trust for Public Land and to Bette Midler’s New York Restoration Project.)

At the same time, it allows for developers to proceed without review with construction of more than 2,000 units of affordable housing on 36 garden sites.

“We need open spaces and we need housing, and we believe that the balance we’ve achieved is the right balance,” said Mayor Bloomberg.

Another 110 city-owned plots still slated for housing and neighborhood facilities will be given new measures to defend themselves during the city’s land use review process. Previously, gardens that went before the City Council for development approval were often listed as “vacant” lots. Now, the city must create a “Garden Review Statement” documenting each garden’s history and membership in Green Thumb, with photos, which will be circulated to community boards, City Council members and the City Planning Commission.

“For the first time, gardeners and their contributions to the community are being officially recognized in the land use process,” notes Green Thumb director Edie Stone.

If a plot is targeted for development, the city must also provide gardeners with a list of nearby available city-owned lots where they might relocate.

Attorney General Spitzer said he hoped the new review process would encourage both the city and private developers to seek ways to accommodate open space. Several gardens, he noted, are being saved because private owners made arrangements with local gardeners to either build around them or relocate the plots to nearby land.

On 110th Street and Lexington, Elmo Realty agreed to scale back its apartment complex to make room for the Catano Garden, which will be relocated to a lot next door. “We lose a lot of apartments and floor space, but we felt that this would be better in the long run,” said Chris Jochim, vice president of Elmo Realty. “When you fight with the community, nobody wins.”

For a complete list of gardens and their fate, go to http://www.oag.state.ny.us/environment/community_gardens_sum.html.