A hefty contribution to affordable housing and strict limits on nitrogen are the two main elements of a deal struck late last week between the Oak Bluffs planning board and the buyers and sellers of a failed subdivision in the Southern Woodlands.

At a public hearing Thursday night the planning board voted to allow the 2004 special permit for the subdivision to be amended with new conditions; under the new terms, the town affordable housing trust fund will receive $700,000, and the number of bedrooms allowed will be reduced, keeping nitrogen output at a maximum of 19 milligrams per liter.

The subdivision lies in the watershed for the Lagoon Pond, a saltwater pond that is at its limit for nitrogen.

Negotiations have been under way between the planning board and NLP Finance since late June when the 51-acre property was sold in a foreclosure auction for $5.15 million. Terms of the sale included a requirement that NLP clear all permitting issues with the town and the Martha’s Vineyard Commission. The buyers are an investment group headed by Boston businessman Paul Adamson, a season Vineyard visitor. Mr. Adamson has said he and friends plan to build summer homes in the subdivision and sell the remaining lots.

Approval will still be needed from the MVC, which approved the 26-lot subdivision as a development of regional impact in 2004.

At the planning board hearing Thursday there was compromise on both sides. Sewer commissioner and selectman Gail Barmakian asked the board to grant more time for study on the nitrogen limits. On the question of affordable housing, Marie Doubleday, chairman of the town affordable trust, read a letter asking for a contribution of $880,000. But Geoghan Coogan, a Vineyard Haven attorney representing the buyers, said $700,000 was the maximum the potential buyers were willing to contribute, and $50,000 more than their last offer. Mr. Coogan also said the buyers had ties to the Vineyard and had a stake in the health of the Lagoon Pond.

Planning board chairman Brian Packish said: “We have a variety of choices; if we accept this agreement they can move to the commission, come back to the planning board and go through the final process of amending the permit.”

In the end the prospective buyers agreed to cap the total number of bedrooms at 156 for the 26 lots, less than the 190 bedrooms allowed. Enhanced, nitrogen-removing septic systems will also be required.

John Breckenridge, a member of the MVC from Oak Bluffs, sounded a warning note about the nitrogen issue in the Lagoon. “The standards that we set are really high,” he said. “We were not just picking a number out of a hat, and saying, oh, that’s good enough, because it’s never good enough.”

Mr. Packish said: “Unless we got to . . . . zero there will always be a person who says it’s not enough. Now the light has been shined on the fact that we don’t have regulations in place [on nitrogen] and we clearly need them.”

The board voted unanimously to allow the special permit to continue with the new conditions.