When Sarah Joliat was hired as a firefighter in Fairfax County, her excitement quickly gave way to alarm at the sky-high cost of an apartment in the area for herself and her 13-year-old son.

Then she learned about a new county program offering subsidized housing to fire department recruits and their families. Instead of commuting from Fredericksburg or Winchester, which are more affordable, she would be able to temporarily rent a three-bedroom condominium just a short distance from work for $800 a month.

"I was ecstatic," said Joliat, 34, who before getting the job had been working at Starbucks and living with a friend to make ends meet. "There was no way I would have been able to live in the county otherwise."

Increasingly, governments in affluent areas across the country are considering similar steps to provide partly subsidized "workforce housing," a term that has cropped up in the past few years to describe affordable housing programs targeted at the middle-class workers who make up the core of the local workforce, said David Jeffers, director of Fannie Mae's community business center in Northern Virginia.

Those in the target population -- firefighters, teachers, nurses and other moderate-income workers -- aren't poor, but they don't make enough money to live in the places they serve, he said. So they commute from hours away, straining their families and clogging up traffic for a paycheck that, for now, seems worth the trip.

Fewer than a quarter of Montgomery County's firefighters live where they work, according to a recent report. The same holds true in Fairfax, where some firefighters commute from as far away as Pennsylvania, Delaware and West Virginia.

Many experts predict that these moderate-wage employees eventually will tire of that way of life and seek work closer to home, causing worker shortages in the communities they leave behind, Jeffers said.

This has been a wake-up call to local governments, he said. "People are starting to say, 'Hey, wait a minute, now [the affordable housing crisis] is not just the poor and the near-poor -- it's starting to affect firefighters and middle managers,' " Jeffers said. "This is not just do-gooderism. This is about people we never thought we would be without."

Montgomery officials are considering increasing the number of workforce housing units; the shortage could be a central issue in next year's race for county executive. Fairfax's top elected official, Board of Supervisors Chairman Gerald E. Connolly (D), said in his 2003 inauguration speech that building affordable housing for public safety workers and teachers would be a top priority during his term.

Not surprisingly, many of the workforce housing programs begin with emergency personnel and teachers, who put a sympathetic face on the affordable housing issue, Jeffers said. But the real problem will be the entire service sector, including car mechanics, grocery workers, as well as others in the private sector.

Fairfax officials say they will first focus on emergency personnel who would be critical in case of a Sept. 11-style disaster.

"In this day and age, you want to have your public safety personnel close by," said Paula Sampson, director of the Fairfax County Department of Housing and Community Development.

Fairfax's year-old firefighter and paramedic housing program, which places eligible recruits in one of 10 low-rent Fairfax area condominiums owned by the county, is aimed at providing affordable housing to new firefighters and paramedics for a couple of years, during training and the start of their careers.

It is the first such program county housing officials plan over the next few years, paid for through a combination of federal dollars and an $18 million affordable housing fund set up this year by the Board of Supervisors. In the next few months, housing officials hope to announce two more projects to provide between 45 and 60 new low-rent apartments and townhouses for Inova Health System hospital workers. Those units would be built by the county.

Like hospitals across the United States, Northern Virginia's Inova Health System is experiencing a nursing shortage. There are nearly 400 open nursing positions, or almost 10 percent of its nursing staff, hospital officials said.

Like the firefighters' program, the Inova partnership is designed to help the hospital recruit and retain nurses and other emergency workers temporarily. The hope is that they later can afford to rent locally or qualify for a first-time buyers program, Sampson said.

"We wanted to be able to offer something special to individuals who are moving from a job to a career, with the hopes that once they've moved from a job to a career, they can be on their own," she said.

But becoming financially secure in a place as expensive as Fairfax County -- where Census data show the median single-family home price soars past $500,000 and almost 40 percent of households' incomes are more than $100,000 a year -- can be beyond the reach of many people.

A starting Fairfax firefighter is paid about $43,000 a year, jumping to about $53,000 after five years. A beginning nurse working a 40-hour week in Northern Virginia can expect a salary of just under $50,000, according to Inova.

For Sarah Joliat, two years in a subsidized apartment won't help her save enough money for a down payment on a house. It probably won't even be enough to allow her to rent a place in the county, she said. Ever since she moved in, she said, she has scanned apartment listings to check for affordable options, with dismal results.

Until she figures out what she is going to do in the future, Joliat is enjoying the ample space and full amenities -- including a washer and dryer purchased by the fire department -- of her condo, she said.

She also loves living so close to work that her son and his babysitter can drop by the fire station after school or during summer vacation to play catch in the yard or just hang out at the station, she said.

"At this point, I have no idea what I'm going to do after," she said. "I'm just hoping for the best."

Without the Fairfax-subsidized housing, "there was no way I would have been able to live in the county," says firefighter Sarah Joliat. She pays $800 a month for a three-bedroom condo.