The thousands of people seeking affordable housing in Northern Virginia got a bit of good news Saturday when two local governments approved plans for projects that will add more than 200 moderately priced apartments to the region.

The Arlington County Board agreed to lend AHC, a housing nonprofit group, $16.5 million to help it buy the Serrano Apartments, a 285-unit complex on the west end of Columbia Pike. Two-thirds of the apartments, about 196, will be made affordable to people who earn less than the region’s median income.

Seven miles away, in the southeast corner of Alexandria, the 115-unit Hunting Terrace garden apartments will be demolished and replaced with 443 new apartments, 24 of which will be made affordable to families that earn less than the region’s six-figure median income.

The Alexandria City Council unanimously approved a special­use permit allowing the new development.

The two votes illustrate the challenges and strategies that local governments deal with as they try to create housing for middle- and lower-income residents in Northern Virginia.

The median income for a family of four in the Washington metropolitan area is about $107,000. Sixty percent of that median, the level used to determine the affordability standard, is $64,200. Federal guidelines recommend that people pay no more than one-third of their monthly income for rent and utilities. But the average apartment rent in Arlington was $1,999 in 2012, well above the affordability standard.

“This is one of the challenges faced by a community that is so desirable that we can’t keep people away,” Arlington County Board Chairman Jay Fisette (D) said Saturday after the vote. “The investment this community has made — we invest 5.2 percent of our general fund in housing, four times the amount Fairfax does. . . . We invest five times our other neighbor [Alexandria] does — they devote 1.9 percent of their budget” to housing.

The amount of housing affordable to people making what used to be called moderate incomes is shrinking in Arlington and Alexandria. Housing costs and median incomes are going up, and that drives up the price of rent for people who are unable to afford to buy homes in Northern Virginia.

Arlington works with several nonprofit agencies that provide housing assistance to a wide variety of residents.

The 2.5 percent, 30-year loan to AHC, one of the major housing nonprofit groups, will not displace current residents but will make Serrano affordable for the next 60 years to households earning 60 to 80 percent of the area median income. It will create 10 permanent supportive apartments. Nearly an acre of vacant land that fronts Columbia Pike could be sold.

Several residents of Columbia Heights, where Serrano is located, pointed out that the neighborhood hosts 16 percent of all committed affordable apartments, even though there are 60 neighborhoods in Arlington. North Arlington neighborhoods have few, and in some cases no, affordable units; and the east end of Columbia Pike has far fewer than the west end of the pike.

Alexandria, which has lost more than 12,000 affordable housing units since 2000, aims to develop or preserve 2,000 units through 2015. It’s a hot-button issue in the city, which has periodically seen civic battles in the Beauregard area and even over creation of a modest new building near Potomac Yard.

The Hunting Terrace apartments are not particularly affordable; more than 80 percent of existing tenants make too much to qualify for subsidized units.

But when Rockville-based developer FP Alexandria sought a special-use permit to begin demolition and construction of two multi-unit buildings there, it originally proposed 515 units with 49 affordable apartments. The size of the building was reduced, at the city’s request, to 443 apartments, and the number of affordable units dropped to 24. They will be affordable for the next 40 years, and the developer will make a voluntary contribution of $553,581 to the city’s housing trust fund, but the extra units were lost.

The Alexandria Affordable Housing Advisory Committee unanimously approved the plan in February. Residents and council members who spoke Saturday spent more time on the facade of the buildings, traffic and sidewalks.

Attorney Cathy Puskar, who represented the developers, said Saturday that the 20 current residents whose incomes are lower than the median pay rents in excess of recommendations, but they make it up in lower transportation costs, because the area has good bus connections.