All is not well beneath the manicured lawns and tidy horse pastures of Middleburg. Old water pipes are cracked and leaking. Rain rolling off roofs and streets carries gunk that seeps into the water and sewer system. A well that was built two decades ago but never used remains shut because its water has high levels of impurities. And a 20-year-old sewage treatment plant is in disrepair and has drawn the concern of town officials.

"You go another 10 years on this system and it's going to deteriorate further, and there are going to be some high maintenance costs," said Town Administrator Mike Casey.

Town officials say it will cost about $5 million to fix their water and sewage problems, and residents and businesses are going to have to help foot the bill, including an estimated $2.2 million for a new well and water treatment plant. Because Middleburg has only 632 residents, and the water and sewer system has only 435 customers, the cost of improvements has to be spread among a relatively small group of customers.

The Middleburg Town Council likely will raise water and sewer rates by 10 percent when it votes on its 2004-05 budget June 10. Town staff members have recommended an additional 10 percent increase in each of the following two years. Casey said he did not know the average water and sewer rate but said "there's no question we're on the high end" compared with other towns in the area.

Town officials have tried to expand the water system's capacity and improve water quality for almost a decade. Their efforts have been plagued by a string of failed design plans, delayed contract negotiations and instances in which the town was "essentially at the mercy of the technical experts, who themselves seemed to have no immediate solution," according to a memo Casey wrote for council members this year.

Mayor C.L. "Tim" Dimos and others emphasized the difficulty of improving the water and sewer system without a large base of customers to provide revenue.

"It's not because we're inept or don't know how to run a water-sewer facility," Dimos said. "It's because we're small."

Like much of Loudoun County, Middleburg relies on wells for its water. The Loudoun County Sanitation Authority, which is supplied by the water authorities in Fairfax County and Fairfax City, serves only eastern Loudoun.

Middleburg has four wells, only two of which are operable. The water in one of those wells has high levels of iron and manganese and needs to be mixed with purer water to be safe for use.

One of the two inoperable wells -- which was out of use because of impurities in the water -- is set to go into operation this summer, along with an adjacent water treatment center just east of The Plains Road and south of Federal Street. The facilities will allow the town to generate more water and to ensure its purity.

Dimos said the well will satisfy the town's water needs for a long time to come. "When we get the new well in service, we will have substantially more capacity than we presently need," he said.

Plans to improve the well and build the water treatment center have been in place for almost a decade. In the late 1990s, officials said the project would cost between $500,000 and $600,000 -- an estimate Casey says was too low even at the time. The cost has skyrocketed partly because of inflation.

Last year, Middleburg fired the first contractor hired for the job. Dimos said the town and the contractor "did not have a good working relationship."

Land for the well and treatment center was donated by a private foundation. The estimated cost of the facilities is almost $2.2 million, which includes work that had to be scrapped because of problems with the design.

As Middleburg officials have struggled to improve water service, they have also focused on the town's sewage treatment center, which is about 20 years old and deteriorating, Dimos said. Middleburg has a particularly high level of infiltration and inflow, meaning that large amounts of water from streets, rooftops and other areas seep into the town's system. As a result, a higher percentage of sewage and water needs to be treated than otherwise would be.

The town has been relining pipes, some of which are more than 50 years old, but eventually, Casey said, Middleburg will have to make more substantial improvements to the sewage treatment center. In all, work at the facility is expected to cost more than $3 million.

To offset some of the costs, the town is hoping Sheila Johnson, co-founder of Black Entertainment Television, will ask to buy water and sewer service from Middleburg for the upscale Salamander Inn & Spa she is building just outside town limits. Dimos said that engineers from the town and Salamander Inn have explored the possibility of cooperation in the past and that it remains unclear what Johnson will decide. A spokesman for Johnson said the town had not approached Salamander with a formal proposal.