With $160,000 in mind to spend on a four-bedroom house in Annapolis, Jim and Susan Lapp thought house hunting would be easy.

They didn't demand waterfront or water views, after all, and they didn't insist on living in the quaint and expensive historic district. "We looked at houses for six or seven months," Susan Lapp said. "We wanted a high-quality four-bedroom house with a small yard." But they didn't have much luck.

Tim O'Brien, a civilian professor at the Naval Academy, asked real estate agents if they could find his family a house in Annapolis for less than $100,000. "They started telling me that I was crazy, that it was impossible," he said. "And they were right."

The O'Briens are solving their problem by buying a town house several miles north of Annapolis. The Lapps are moving to Richmond.

Firefighters, police officers, schoolteachers, sales people and others outside of the high-paying jobs of Washington and the high-tech suburban corridors are having a hard time finding a place to live. While attention is paid to the homeless and tenants of low-income buildings, people making a modest income in an area with some of the most expensive housing in the country are moving farther and farther out to find affordable housing. Or, people like the Lapps -- Jim Lapp is a medical supply salesman -- are leaving the region altogether.

Some who can't move away seek temporary shelter in moderate-income housing or buy mobile homes. Anne Arundel has the largest number of mobile homes of any county in Maryland. Others are forced to rent indefinitely or buy houses they consider substandard.

Years ago people moved from the District to the closer-in suburbs to find affordable housing. Then counties such as Montgomery and Fairfax grew beyond the grasp of many people earning between $20,000 and $35,000.

But now counties such as Howard, Anne Arundel and Frederick are too expensive for many people. Their fast growth and influx of new businesses and industries have brought in people who not only can afford expensive houses but also in bidding wars offer thousands of dollars more than what is initially sought by sellers.

In the Washington area, the average price of single-family detached houses, town houses and duplexes sold last year were $109,000 in Anne Arundel County and $135,534 in Montgomery County. The average cost of a house in the District was $148,975 last year, according to local real estate boards. Even in Prince William County, the average price of a house was $92,164, according to county records. In comparison, in Richmond, where the Lapps plan to move, the average sale price of a house last year was $77,218, according to real estate agents there.

"There's a large percentage of people who fall between the cracks, who are not the extreme poor nor are they the very affluent," said Carl Snowden, an Annapolis City Council member active in housing issues, "and they include teachers, firefighters, police officers, etc., who aren't able to put enough income together to buy property."

Snowden said areas such as Anne Arundel seem keen to attract families whose incomes exceed $100,000 a year, and the real estate market has responded by building expensive houses for them.

Real estate experts also say that building large, expensive houses is more profitable than building smaller ones, and that many jurisdictions restrict more dense developments that could provide many low-cost houses.

Also, the large concentration of high-income workers in the Washington area helps push up housing prices.

Three years ago the Anne Arundel County Council created a task force to study the problem of affordable housing. The study said that "for those with income levels at or below the median household income of $27,542 per year, affordable housing is either not available or barely attainable . . . . Single family housing, the American Dream, has reached a point in Anne Arundel County where a great number of potential home purchasers must truly just dream."

Howard County, where average house sale prices run about 4 percent above those in Anne Arundel and the median household income is 20 percent higher, is seeing the same influx of home buyers and escalating house prices. "Each of these areas is growing and each attracts people because of its relative charms," said Ronald Davis, the county's housing assistance director. "Howard County has Columbia, the most successful new town in the country . . . and Howard County sits almost midway between Baltimore and Washington. It's a natural magnet."

While Howard, like Anne Arundel, has several programs designed to help low- to moderate-income families buy and rehabilitate houses, house prices continue to go up. "Until you get a situation where there's no significant number of vacant sale and rental units," Davis said, "you are going to have prices which continue to escalate, and that's the way the market works."

About 3,300 Anne Arundel families have found a half-way point between renting and buying by living in mobile homes.

Robert Hunt paid $9,500 for a three-bedroom trailer in Crownsville, just outside Annapolis, that is about the size of a small three-bedroom apartment. The trailer park has small tidy yards with lots of flowers and is surrounded by several acres of farmland.

"It's good for someone just starting out," said Hunt, who works for a building contractor and moved into the mobile home park four years ago with his wife and two young children. The close neighborhood atmosphere of the tidy, garden-strewn park is good for the children, he said, but "there's no doubt it was always meant to be a temporary place for us. It's nice to own, but you are also renting it."

Besides paying for the apartment on wheels, complete with shag carpet, wall hangings, separate bedrooms and enough space between him and his neighbor for a tree, Hunt pays $290 in monthly rent for the small lot on which the trailer sits.

David Howe, 40, a welder from Pasadena in Anne Arundel, recently started looking for a house to buy with his wife, Linda, a government tax accountant. He said they started looking at houses for about $70,000, but quickly abandoned hope of finding one that wasn't dilapidated. He said he will have to wait two years and expects to spend enough money to buy a house that will cost $125,000.

The real estate market "has just gone bananas," complained Howe, who grew up in Annapolis and Glen Burnie. "It's people coming into the county that can afford the high prices {who} are driving the people living in the county out. I'm not going to get out. I'll do something, but it's not going to be easy . . . . If I didn't have some money saved up it would be impossible."

According to a 1984 state study, only 41 percent of Anne Arundel households could afford to buy an average-priced house in the county. However, because many of these families had inherited houses or had bought in early years of lower housing prices, approximately 70 percent of the county's houses were owner-occupied.

Some of the problems of Anne Arundel are unique. The Washington suburbs are spreading east into the county, and the Baltimore suburbs are spreading south. Wealthy people from the Washington area are moving to houses along the county's waterfront, on farmland and in the historic county seat of Annapolis, and are willing to pay the sort of prices commanded in Chevy Chase and upper Northwest Washington.

At the same time, building restrictions imposed by the county and the state in efforts to cut pollution of the Chesapeake Bay have made property near the bay and its tributaries more expensive. And in many areas of Anne Arundel, limits on the county's water and sewer system have made it more difficult and expensive for developers to build.

Real estate agents and county officials say the result, quite simply, is that people pay up or lower their expectations. They buy smaller houses in less convenient locations or they don't buy at all. Several real estate agents in Annapolis estimated that more than half their single-family house sales were to people moving from the Washington area.

As housing prices have climbed over the past decade, more and more Anne Arundel residents moved across the Bay Bridge to Kent Island in Queen Anne's County, on the far side of the Chesapeake Bay. At last count, more than 40 officers of the 477-member Anne Arundel police force lived there.

But even Kent Island has had a dramatic increase in housing prices, real estate agents said. "You can still save quite a bit, but you have to really pick your property and make compromises," said Reginald Jones, a Kent Island real estate broker.

Michael Parker, another civilian professor at the Naval Academy, plans to start hunting for a house next year, but with trepidation. "The Naval Academy professors played a big role in civilizing Annapolis," Parker said. "They formed a committee to start the Annapolis library right after World War I, for example. Those people aren't going to be in town anymore, because they can't afford it."