When the layoff notices arrived last week for the more than 600 workers at a Frederick County aluminum plant that could shut down by year's end, it was hardly a surprise.

The Eastalco plant managers had been pleading for months with the state to help resolve an impasse over the company's electricity contract. But the closure of the plant, one of the last remnants of heavy industry in Maryland, appears inevitable unless state officials sacrifice a commitment to the energy deregulation process started in 1999.

The deadlock involves the aluminum giant Alcoa's contract with Allegheny Power, signed before Maryland's energy industry was deregulated. The contract expires Dec. 31. After that, the plant would pay market prices for electricity, increasing its annual power bill from $89 million to $195 million.

There is no way to work in the dark: Electricity is a key ingredient in the process of making aluminum, and as a result the plant is the largest user of power in Maryland.

Both the power company and the aluminum plant are victims of the surging cost of electricity, driven by an ever-higher demand for such fuels as coal and natural gas. In 2000, a megawatt hour cost $30.72; in 2004, it was $44.34, and this year it has jumped higher than $50. This is bad enough for the typical consumer, who uses 10 megawatt hours in a year, but for Eastalco, which burns 350 megawatt hours a day, it makes it impossible to sell its aluminum ingots at a profit, company officials said.

Brian S. Dahlberg, the plant's manager, has said for months that the plant would close unless a new contract could be signed -- or a state law passed -- that would limit the price to $40 a megawatt hour. Allen Staggers, a spokesman for Allegheny, said that can't be done without his company absorbing unacceptable losses of its own.

Gov. Robert L. Ehrlich Jr. (R) has not taken a public stand on the issue, said a spokeswoman, who referred comment to the state Department of Business and Economic Development.

There, Deputy Secretary Chris Foster was pessimistic, saying he expected that global economic trends would prevail and that the closure of the plant would be unavoidable.

"I think we all know what the outcome is," he said. "I don't see any other option. . . . It's very unfortunate. These are real people with real families."

Union leaders said the layoff notice had hit morale hard. "I knew it was coming, but it's still like a blow in the gut," said Stanley Biggus, the servicing international staff representative for the United Steelworkers of America.

Eastalco's management has pinned its hopes on Maryland lawmakers, who are drafting a bill for the next legislative session calling for a cap on the electricity rate Alcoa can be charged until 2007. The firm also is considering building its own power plant.

If the measure passes, it would take effect as soon as it was signed by Ehrlich. If it does not, the plant, home to about 500 workers from Maryland and 100 from West Virginia, will close. Dahlberg has said Alcoa likely will open a new plant overseas, where electricity and labor are much cheaper.

Foster called the prospect of a bill fixing the electricity rate "unrealistic," noting that the increase in energy costs would have to be taken up by Allegheny, which would be forced to pass the cost to consumers or go bankrupt.

"Government bailouts, as a solution, are not a good idea," he said.

Dahlberg worried that the bill wouldn't pass. He said he presented some of his thoughts to a panel of Maryland lawmakers last week, and "the pushback we got from some folks that were in the room gave me a lot of concern."

One long-term solution, Foster suggested, is for Alcoa to buy its own power plant, or to build one. But Dahlberg said that wasn't likely. The parent company had agreed to allow another firm, Sempra Energy, to build a natural-gas plant on the Eastalco campus in Adamstown. But given the jump in natural gas costs, Dahlberg questioned whether Alcoa still intended to do it.

"At this point, I don't even see that facility being built by 2009," Dahlberg said.

In the meantime, the plant stopped ordering raw materials last week, and on Thursday it sent letters to salaried employees and union representatives, giving the required 60-day notice that they could be dismissed starting Dec. 15. A small number of employees would continue working at the plant for a few weeks as it shut down, he said.

"At this point, if we don't have something that will absolutely work, or give us an absolute assurance that we will have reasonably priced power on the 31st of December, we will shut down," Dahlberg said. The plant could be restarted if a deal were made in the legislative session, which begins in January, he said.

Some workers have quit their jobs to look for other employment. Twenty-five of the plant's 630 workers have left, a spokesman for the plant, Earl H. Robbins Jr., said. Those who remained also were taking the plant's closure as a done deal.

Chip Cook, an electrician at the plant and head of the United Steelworkers Local 7886, said most of those leaving were younger employees who would receive little in the way of severance pay. He said he hoped the state and Alcoa would help the workers find other jobs.

Cook's friend, Charles H. Garst, a heavy equipment operator at Eastalco, said he had started working at Eastalco in 1970, at age 21, just when the plant was opening.

"I just hate to see the thing go down," Garst said. "I was actually there to help start the plant, and now it looks like I'll be there to help close it down."

The Eastalco aluminum plant in Frederick County produces different sizes and shapes of raw aluminum. The company is the largest consumer of electricity in the state: It burns 350 megawatt hours a day.