Virginia Electric & Power Co. unloaded a potential white elephant yesterday by signing an $800 million agreement to share its controversial Bath County energy storage project with Allegheny Power System.

Allegheny will either buy or lease half of the $1.6 billion facility -- in either case saying Vepco's customer's millions of dollars, Vepco President William Berry announced here.

Berry said the sale will help avoid future increases in electric rates and will at the same time improve Vepco's profits. "It's good news for both our customers and out stockholders," he added.

Scheduled for completion in 1985, Vepco's Bath County project is the biggest electricity storage facility ever built in the United States and has turned out to be bigger than Vepco needs.

Since the project was launched a decade ago, Vepco's growth rate has dropped from 10 percent a year to 3 percent. Vepco slowed construction on the Bath works earlier this year but still will complete the project several years before it is needed.

Located in the mountains of southwest Virginia, the Bath County project is not meant to generate additional electricity for Vepco customers but instead is designed to store power for periods of peak demand such as the hottest days of the summer.

To do that, Vepco has built two small lakes, one about 1,000 feet above the other. Connecting the two lakes are giant tunnels that come out of the bottom of the upper lake like the drain from a bathtub, then drop striaght down to a hydroelectric power plant.

When its customers need extra electricity, Vepco will pull the plug in the upper lake and let the water plunge through the mountain to spin six turbine generators in the power plant. When the company has power to share -- at night or on weekends -- the excess will be used to pump the water back up the hill and store its power for future use.

Pumping the water back consumes 50 percent more power than the plant produces. But if the water is pumped with coal or nuclear power, the project is cheaper to run than the oil-burning power plants Vepco now uses to meet peak power demand.

But Vepco's peak will need less than half of the Bath County project's output when the plant is finished five years from now.

Early this spring Vepco laid off three-quarters of the crew on the project and moved the completion date back from 1983 to 1985, saying it couldn't afford to continue construction on a power plant it didn't need.

The delays will add $233 million to the Bath budget, But Vepco contended it would cost even more to complete the plant and let it sit idle.

When the construction slowdown was announced, Vepco disclosed it was looking for a partner for the project.

Meanwhile, Allegheny Power had been planning a pumped storage facility of its own to serve customers in Northern Virginia, West Virginia and Pennsylvania but had run into stiff opposition from environmentalists.

At the urging of federal officials, the two utilities began negotiating last spring, but high interest rates halted talks, Vepco's Berry said yesterday.

Executives of the two utilities began negotiating again when rates headed down, and Vepco offered Allegheny a better deal with a choice of financing plans, Berry explained.

Under the preliminary agreement signed by the two companies, Allegheny promises to take 40 percent and as much as 50 percent of the Bath project, either by buying the facilities outright or by signing a long-term contract for their use.

If Allegheny decides to buy a 40 percent share, it will have to pay Vepco $230 million in cash for work already done and to pay for its share of the rest of construction.

Vepco executives said they expect Allegheny to buy part of Bath for cash and to contract for the remainder of its share. The long-term power contract would cost Allegheny more than an outright purchase, Vepco officials said, but would eliminate the need for Allegheny to raise new capital.

The money Vepco gets from the partnership with Allegheny will be used to convert several oil-burning power plants to use coal, Berry said.