Arlington Presbyterian Church is located on Columbia Pike, where real estate is valuable. The church is selling its property to make way for an affordable-housing project. (Michael S. Williamson/The Washington Post)

The church members asked themselves, “For whom are our hearts breaking?” They set out to find the answer by quizzing the waitresses, teachers and store clerks who bought from the food truck in the church parking lot or shopped at the nearby farmers market in Arlington’s ­fast-gentrifying Columbia Pike neighborhood.

Again and again, they heard the same worries from working-class residents, many of them immigrants: “I work here, but I can’t afford to live here anymore.” Eventually, said elder Susan Etherton, she and other members of the Arlington Presbyterian Church’s vision committee came to believe God was calling them to action.

The century-old congregation decided to sell its building, parking lot and grounds to the Arlington Partnership for Affordable Housing, which will tear down the stone structure and replace it with 173 affordable apartments.

It was not an easy or speedy choice. Church membership, which was 150 when the Rev. Sharon Core arrived 17 years ago, has shrunk to about 65. But Core said that wasn’t the main reason the congregation decided to sell. The process started in 2012, she said, when the church began seeking to renew its mission and build better ties to its neighbors along Columbia Pike. It took months of prayer and reflection, and then years of work.

The church members had to be persuaded, and some were not. Church leaders needed approval from the National Capital Presbytery to sell the property, and their first proposal was turned down. They had to find a developer willing to work with them and secure the permits required to turn the expansive site into a multi-family building.

“People have been married here, had their children baptized here and held memorial services for loved ones ,” Core said. “We had serious, serious discussions, and it’s not something we did lightly. But we know in our heart of hearts the church is not the building. It is our faith and our people.”

This church is not the first to sell or reduce its worship space to facilitate the building of homes for those in need. About a decade ago, the First Baptist Church of Clarendon decided to build a 10-story affordable apartment house around a new and smaller sanctuary, triggering years of conflicts with neighbors. This fall in Alexandria, St. James United Methodist Church agreed to sell its three-acre site in the Beauregard neighborhood to the nonprofit developer AHC, which plans to create 93 affordable apartments and sell the rest of the property to a market-rate developer. AHC is in talks with another Alexandria church that is considering a similar project.

The churches’ goals are twofold: to ensure their own financial viability while easing a growing crisis for low-earning people in a region where the cost of housing keeps going up. As land becomes more valuable and rents increase, fewer privately owned apartments are affordable to those earning less than half of the area’s median income, which is $107,000 for a family of four.

Two years ago, 3,600 people ­applied for a chance to rent one of the 122 apartments at the then-new Arlington Mill affordable housing building. Three months ago, the Arlington County Board said ­nearly 1 in 5 residences built in the county over the next ­quarter-century must be affordable for low- to moderate-income households.

Arlington Presbyterian Church members have understood the problem intellectually for years. But it wasn’t until they began speaking to their neighbors that the crisis made an emotional impact. Etherton, one of seven church members who did the outreach, said when the group reported back to the congregation, she could almost see people’s perspectives shift.

Susan Etherton, hugging Leslie Bull, was a member of the “vision team” that helped shape the proposal to sell the church. (Michael S. Williamson/The Washington Post)

“When they heard those stories of heartbreak, there was head-nodding and agreement,” she said. “When you tell personal stories, they have a resonance.”

The congregation was not unanimous in support of the decision, Core and Etherton said. Some members objected and then stopped coming to church. One unsuccessfully applied to have the building declared a historic landmark, which would have made redevelopment extremely difficult.

The first proposal, in 2013, was to rebuild the existing church with a coffee shop, day-care center and community space and attach ­affordable-housing units to it. But the National Capital Presbytery, which holds the property in trust, turned down that idea.

A year later, the church members returned with a plan to sell the property to the Arlington Partnership, a well-established nonprofit group that has built similar projects in the community. Representatives from the partnership helped explain to the Presbytery how selling the building would further the congregation’s spiritual and moral missions. This time, the oversight group gave its unanimous approval — and a standing ovation.

The church is in the process of selling the land to the partnership for $8.5 million, 20 percent below market value. Arlington County is lending the partnership about $18 million for the purchase and construction.

The new apartments will be named Gilliam Place, in honor of former elder Ronda Gilliam, the church’s first African American member and the founder of a clothing donation program for neighborhood residents in the early 1960s.

Nina Janopaul, the Arlington Partnership’s president and chief executive, said the design will incorporate stone from the church into the street-level facade. Sixty percent of the apartments will be studios or one-bedroom units, and the complex will be marketed to low-income senior citizens. The County Board recently approved rezoning the land for multi-family residential use.

The church will turn the property over to the Arlington Partnership by August; Core said the last Sunday services probably will be held there in late May or early June. She has begun clearing out furnishings and giving away the pews, the organ console and hymnals to other churches and homeless shelters.

The congregation is looking for temporary rental space along Columbia Pike; it plans to rent ground-floor space in the new apartment building so it can worship at the church site once again.

The vote by county lawmakers to rezone the property and award the loan took place on a Saturday in early December. The next day, the scheduled Gospel reading was Ezra 3:10-13, a passage that describes the Israelites rebuilding their holy temple in Jerusalem after returning from exile in Babylon.

“No one could distinguish the sound of the shouts of joy from the sound of weeping, because the people made so much noise,” the passage says. “And the sound was heard far away.”

For Core, the imagery was fitting. “I found it powerful,” the pastor said, “that when the people saw the new temple, there was weeping and shouts of joy.”