Pamela Kovach thought she had found a novel way to use the region's soaring real estate market to help low-income people -- until she ran into an unlikely, if well-intentioned, roadblock: the U.S. Department of Housing and Urban Development.

The situation involves Good Shepherd Foundation House No. 3 in Woodbridge.

The nonprofit group, an affordable-housing provider of which Kovach is executive director, bought the house for $220,000 in 1998, with the help of a $120,000 federal housing grant.

Prince William County placed four low-income, mentally disabled adults in the house. Around 25 others, mentally ill or disabled, come during the day to tend gardens on the 4.5-acre property for a county horticultural therapy program. They look after flowers, vegetables, goldfish and waterlilies. By all accounts, the arrangement has been a success. (The property also contains the tomb of Virginia's first U.S. senator, William Grayson.)

But, last year, an appraisal done for the foundation determined that the property had quintupled in value. The foundation decided it might make more sense to sell the property, Kovach said, and use the profits to help more low-income people, either by buying more properties for transitional housing or by establishing other subsidy programs.

"We realized we were sitting on more money than we should," Kovach said. "We thought if we could take this property and leverage more housing for low-income families, that would make absolute sense."

The foundation found a developer that wanted to build a dozen or so upscale homes there; the developer is now under contract with the foundation to buy the property for more than $1 million. The county began looking for other sites for the horticultural therapy program. If the county could not find suitable housing for the four residents, Kovach said, the foundation would provide it.

The problem came to light in a letter she received from the county last week.

Because Good Shepherd originally bought the property using a HUD grant, the letter explained, it must be kept affordable for 15 years -- until 2013 -- a restriction that could thwart the foundation's plans.

HUD officials explained that the property can be sold only with the restriction intact, and that, even then, 55 percent of the profit, the grant's proportion of the original sale price, would have to go back to the county.

Furthermore, the officials said, even if HUD could make an exception for Good Shepherd, they are inclined not to, because of the precedent it could set, prompting other housing providers in hot markets across the country to apply for an exemption, take the money and run.

"We don't understand what the good cause would be, given this set of facts," said Mimi Kolesar, director of HUD's office of affordable housing programs. "Simply to sell because you can receive a lot of money is not, in our view, a good reason."

Julian Bermudez, director of housing and community development for the county, which administers the federal housing money, said that it's not a matter of good ideas or good intentions. It's a matter of rules.

"It may be a good idea" to use the money to expand affordable housing programs, Bermudez said, "but that's beside the point."

Kovach, however, said she thought that was precisely the point.

"I'm absolutely stunned by that thinking," she said. "My intention was not to take that money and run to the Bahamas, but to buy more housing or develop more programs for the very people we're committed to serve. So it's been very hard to understand that rationale."

The dilemma comes just a few weeks after Prince William officials released a report stating that 99 percent of the houses sold in the county last year were out of reach for low-income residents, such as entry-level teachers and police officers. The median price of new homes last year was $432,780; the median price of all homes was $300,000, the report said.

Good Shepherd owns seven houses around the county that serve 31 low-income people. They are charged 30 percent of their monthly income for rent. Government dollars and private donations subsidize the rest of the cost.

On their tax return filed last year, the foundation reported total revenue of $89,642, of which $23,862 was rent, $40,166 was direct public support and $15,154 was government grants. They reported $86,615 in total expenses, of which about $24,000 went to salaries.

"We are a nonprofit," Kovach said. "Non."

The foundation has had a good working relationship with the county, she said, adding that she's hopeful that something can be worked out with HUD. She said the developer may be willing, for instance, to build around the existing house. It's not clear whether that option would satisfy HUD rules, Kolesar said.

"When the county has the goal of helping homeless people, and when it's our mission and HUD's mission to do that, wouldn't it be nice if we could all work together and get this job done?" Kovach said. "I'm here to work out a reasonable solution."