In a metropolitan area with a declining school population and in a nation with 5 million fewer children to educate than in 1971, the question for county officials and school authorities inevitably becomes how to turn abandoned school buildings into profitable community assets.

An example of one way to answer that question is Laurel's Phair office park, formerly the O.W. Phair Elementary school. Prince George's County school officials say the facility is the envy of other school systems here and may serve as a model nationwide for the reuse of surplus schools.

The 25-year-old building at 1000 West St. -- once a police problem, a cash drain on Laurel and Prince George's County and an eyesore that was no longer needed to house baby-boom schoolchildren -- is being transformed into a tax-producing complex of offices. The transformation represents the best use any local government has found for one of the metropolitan area's least-known real estate resources, its scores of surplus schools.

Don Ellis, a property specialist for Prince George's County's bureau of property and management services, has 17 schools to deal with that the county closed this summer. School board plans call for 27 more schools to be phased out in the next four years. Last month, Ellis attended a seminar on how to dispose of unwanted schools that drew participants from as far away as California, but Ellis returned to Prince George's County without any new answers.

"We really have put ourselves in a bind by putting schools in the middle of communities," he said, because residential neighborhoods limit the uses to which surplus schools can be put.

"The problem is, what do you do?" asked Ellis' assistant, Ray Austin. "Novel approaches are okay in a city," he said, "but here, where you're completely surrounded by single-family homes, there is not much you can do." In a city, where the zoning isn't so restrictive, schools can be turned into apartments or condominiums, he said.

"We would like to do that here," Ellis said. "That is a residential use, but the neighbors wouldn't like it."

Both men point with pride and some envy to the Phair School, which will soon reopen its doors as an office park.

"You'll never know it was a school," Austin said.

"That was a clean operation," Ellis said. "We just wish all of them could be the same." It's a good example of what can be done, he added.

The Phair School is in the middle of its metamorphosis. Half the sprawling one-story building is still a standard red-brick and glass school. The other half is a sleek tan stucco office park with mansard roof, private entrances and large asphalt parking areas.

Inside, the contrast is equally striking. Classrooms and long corridors are the standard pale green cinder block. Wooden doors with glass portholes lead into classrooms with large rectangular scars where blackboards used to be.

But in the renovated portion, the ceilings have been lowered and walls relocated to create offices. Floors are carpeted, and new drywall conceals the cinderblocks. It looks like the inside of a new office building.

Brothers Gary and Dennis Berman and Richard Dreisen, whose other joint ventures include the Laurel and White Oak racquetball clubs, own Phair. The architect for the project is Glen Stephens. Turning an abandoned school into a modern office building has required imagination, the support of Prince George's and Laurel city officials, and personal involvement by all three owners, who act as their own developer to cut costs.

The three bought the school for $500,000, contingent on a zoning change that would permit offices in what had been a residential area. However, the neighborhood is mixed, with some businesses across West Street but garden apartments behind the school. The school's location presented a problem because the site was half in the jurisdiction of Prince George's and half in Laurel's jurisdiction.

"It wasn't a nightmare because everyone wanted it done," said Gary Berman. The problem was solved by having the city of Laurel annex the other half of the school and rezone the entire property, since it could act more quickly than the county.

The county was eager to sell the building, which had been empty for two years.

"All the politicians love it," Berman said, and judging from the number of people in photographs of dedication ceremonies, his assessment is accurate. It's no wonder, since a former cash drain now puts money into the county coffers, and new taxpaying businesses are moving to the site. A Prince George's County Council proclamation calls the project "a celebration of a mutually beneficial partnership between the county and private enterprise."

About one-quarter of the 32,000 square feet of office space is rented to a county health clinic, an engineering firm, a state licensing office and a weight-loss center. Finding prospective tenants for the unrenovated portions has been difficult, Berman says, because renters take one look at the austere classrooms and corridors and say they are not interested.

The owners expect to spend about $1.25 million by the time they have finished modernizing the school. The separate offices are being tailored to the needs of the tenants. The major remaining question is what to do with a large, high-ceilinged gym-auditorium.

School officials in other jurisdictions wish that were their only problem. All are looking for new, imaginative uses for their unneeded schools, but the Phair Office Park appears to be the only one in the area so far to become a new source of revenue.

Prince George's Ellis says the county has decided to concentrate on selling its unneeded schools to get them back onto the tax rolls and to stop the drain of money that could go to educational programs. The other options are to tear down the buildings or to use them for other community public service uses such as county offices, recreation or senior-citizen centers. They also can be leased to private schools or churches without a zoning change, which has been done in several cases.

The only other school beside Phair in Prince George's to be sold is Temple Hills Elementary School, which has become Grace Brethren Church School. Ellis said the county had talked to a prospective school buyer two years ago about putting a home for senior citizens in a surplus school. But when the costs were added up, it would have been less expensive to construct a new building than to convert the old one.

Other uses, such as doctors' or lawyers' offices, would have much less impact on a residential neighborhood than a school, Ellis said, but "the problem is educating the public to that."

"It all boils down to the zoning issue," Austin said, explaining that although research and development offices would not disturb the neighborhood, they require industrial zoning.

"What neighborhood would allow that?" Ellis asked.

In Montgomery County, where the school population has dropped from a high of 126,000 in 1972 to a projected 95,000 this year, superintendent Edward Andrews plans to close 31 schools in the next five years. As in other local jurisdictions, surplus schools are transferred from the Board of Education to the county government for its own use, for lease or for sale.

Montgomery's unneded schools have become county offices, county clinics, recreation department offices, training centers for the handicapped and senior citizens' facilities. A number are leased to private schools, including North Bethesda Junior High, which was turned into St. Andrew's Episcopal School. None has been sold.

County authorities say Montgomery has been reluctant to sell the schools for fear a population shift would create a new demand for the buildings. But with better projections available, a few probably will be sold. Giant and Safeway have asked about space for supermarkets, one official said, and the telephone company has expressed an interest in a high school for office space.

"But it would take a zoning change, and a zoning change is hard to come by," the official said. However, he added, he believes there eventually will be several office parks and some housing for the elderly in coverted schools.

Most Montgomery County schools are in areas zoned for residential use. One exception is the Montrose School at Randolph Road and Rockville Pike, a two-room structure built in 1909 that last held students 20 years ago. A nonprofit historic preservation organization called Peerless Rockville bought the building in 1979 and renovated it, using state funds. It was rented last month to the Montgomery Journal Newspaper for use as editorial offices.

The situation is different in the District, said Jean Oliver, an official in the city's surplus property office. Most unneeded schools have been closed for at least five years, so using them for other purposes is not an emotional issue. And the city's financial difficulties make it necessary to cash in on the unused properties.

In a major policy shift, the Barry administration decided earlier this year to sell its unneeded properties to avoid maintenance, return them to the tax rolls and provide housing and jobs for D.C. residents. Three schools are among 17 District properties to be auctioned off later this month.

The District has one advantage over its suburban neighbors in the disposal of unwanted schools. Under the law, properties deeded to the city or federal government do not have to comply with zoning regulations. However, it has been the city's policy to abide by local zoning unless exempted by the City Council.

Only one of about 20 excess city school buildings is leased at a fair market price, said Don Croll, chief of the real estate division of the D.C. Department of General Services. That is the old Dent School at Second Street and South Carolina Avenue SE, which is rented by the Capitol Hill Day School.

Elsewhere in the city, the former Madison High School at 10th and G streets NE is now the House of Ruth shelter for battered women. Two other buildings serve as shelters for homeless men, but officials say they don't get much use except on cold nights. Shaw Junior High School at Seventh Street and Rhode Island Avenue NW is to be rehabilitated with a government grant for use as housing for the aged. The University of the District of Columbia also uses some school space for offices and classes.

In general, said Croll, the city has not had good luck in renting its school properties to nonprofit organizations. One went broke. another found its planned renovation would be too expensive and a third failed to carry the required insurance and returned a fire-damaged building to the city.

Since the city has no money of its own to spare, planned renovations of some schools for other uses -- such as more housing for the elderly -- is at a standstill.

One building, the 100-year-old Summer School, has been saved from demolition: The city announced earlier this month that the structure will be leased to a development group that plans to build a $40 million office complex around it on M Street between 16th and 17th streets NW. The developers have pledged to restore the Summer School and rehabilitate the adjacent 90-year-old Magruder School as well as constructing a new office building.

In Arlington where the school age population has been declining for some time, about a dozen schools have been shut. A number house county offices, job training for the handicapped or arts centers. The Hoffman-Boston Junior High has space leased to a community action program, a preschool and Bob Brown's puppets, where puppets are built.

In North Arlington an imaginative and much-needed use has been found for the Woodlawn School at 4715 N. 15th St. In October it will reopen and be run by the Hospice of Northern Virginia as a home for the terminally ill. The organization has secured a 50-year-lease from Arlington County for a nominal fee and the community has banded together to raise $700,000 to convert the school.

Arlington's Marshal School on 25th Street between Old Dominion Drive and Glebe Road was sold to an architectural firm that hopes to turn it into housing, but so far nothing has happened on the site. The Marshal School annex nearby was burned down by the fire departnemt several years ago, and the land is leased to Marymount College for parking.

The Stewart School on Underwood Street off Lee Highway is to be torn down to create more open space for residents of the area. A move by Arlington-Fairfax Savings and Loan to expand its offices into the school was abandoned when it became too costly.,