After more than three months of work and behind-the-scenes wrangling, Arlington County officials, housing activists and developers reached a unanimous agreement last week on how much developers could be expected to contribute to the county's affordable-housing effort.

Most members of the county working group that approved the plan professed measured optimism about the agreement, which the County Board will probably approve next month.

"This is as good a compromise as we can reasonably hope to achieve," said County Board Vice Chairman Chris Zimmerman (D).

The agreement comes at a critical time for the county. Progress on large-scale retail and residential projects has slowed to a crawl over the past year while details of the plan have been worked out, and the county continues to lose thousands of affordable apartments.

The county's affordable-housing program was upended in December when an Arlington County judge ruled that it was illegal for the county to ask developers to reserve 10 percent of floor space in projects built near Metro stations for affordable housing and to solicit cash contributions from commercial developers. The county's planning department had long allowed developers more density or height in their projects in exchange for cash contributions for affordable housing or actual affordable units for lower-income residents.

The plan gives developers seeking to build projects larger than zoning allows four options for contributing to affordable housing. Developers could choose to provide a small number of affordable apartments or townhouses on a given site; provide a number of affordable dwellings nearby (within a half-mile) or a slightly higher number of units anywhere else in the county; or make a cash contribution to the county's Affordable Housing Investment Fund, ranging from $1.50 per square foot to $8 per square foot, depending on the size of the project.

Millions of dollars are at stake, given the large-scale redevelopment in the county over the past several years, particularly along the Metro Orange Line corridor.

"Now we'll be able to do business in the county again, and that's a good thing," said Andrew A. Viola, regional vice president of Bush Construction Corp.

But some affordable-housing advocates said that the agreement, although positive, would not be sufficient in a county that is rapidly losing affordable places to live. In the past year, nearly 2,000 affordable apartments have been torn down or remodeled to make way for luxury condominiums, officials estimate. They also fear that developers will simply opt to make cash contributions rather than create the low-cost housing that the county needs.

"I'm very glad they came up with something, but the crisis is so large I fear it is still inadequate," said Kristin Carbone, program director for Buyers and Renters Arlington Voice.