Baltimore Gas & Electric Co. and Potomac Electric Power Co. announced yesterday that they will merge to form one of the country's largest utilities, serving about 4.5 million residents of the District and Maryland.

A driving force behind the merger, executives of the companies said, is the upheaval in the electric power industry, which is undergoing massive change as regulators encourage competition, monopolies crumble and utilities prepare to raid each other's turf and battle for shares of the market.

The two companies said they plan to become more competitive by eliminating duplicative efforts, cutting costs and slashing their combined work force of 12,500 people by about 10 percent, steps they said would save $1.3 billion over 10 years.

They said about 1,250 jobs would be eliminated by attrition, early retirements or layoffs.

"I think the key reason for this is long-range strategy," said Christian H. Poindexter, BGE's chairman and chief executive. "We see what's happening out there, and this puts us in the driver's seat."

Officials said they expect the merger, which will require regulatory approvals, to take effect in 1997. The combined company -- yet to be given a name -- will be headquartered in Annapolis but will maintain a strong presence in both Baltimore and Washington, and will have annual revenue of $5 billion.

Although the merger is billed as a combination of equals, BGE will be dominant, holding nine of the 16 seats on a new board of directors. Poindexter, 56, will be the chief executive.

Edward F. Mitchell, Pepco's chairman and chief executive, will serve as chairman of the new company until he retires in 1998, when Poindexter will hold both jobs.

John M. Derrick Jr., Pepco's president, will become president of the new company.

Poindexter said it will be the largest merger in the industry to date, creating the nation's ninth-largest utility with combined assets totaling more than $15 billion.

Baltimore-based BGE is the larger company, with about 8,000 employees and assets totaling $8.1 billion. District-based Pepco has about 4,500 employees and $6.97 billion in assets.

Last year, BGE's revenue was $2.78 billion, compared with Pepco's $1.8 billion. BGE serves 1.1 million customers for electric power and 538,000 natural gas customers in Baltimore and central Maryland.

Pepco serves more than 670,000 customers in a much more compact, 640-square-mile territory that is about one-fourth the size of BGE's.

Analysts said that Pepco, having encountered limits on its ability to grow, will benefit from the merger by becoming part of a more aggressive competitive effort. Pepco's efforts to diversify into the aircraft leasing business had faltered and dragged down earnings. A few months ago, the utility announced it was leaving the leasing business.

BGE gains from the merger, the analysts said, because it will achieve a "critical mass" that helps shield it from takeover attempts and enables it to compete to sell energy services outside its regular territory.

One of the new company's first targets might be the territory of Washington Gas Light Co., which distributes natural gas in Washington and adjacent areas, analysts said.

BGE also will expand its sources of fuel for power generation, they said. Forty percent of BGE's power comes from its nuclear power plant at Calvert Cliffs, Md. The merger will reduce BGE's dependence on nuclear power, which faces an uncertain future, although Calvert Cliffs has a reputation as a well-run plant.

The electric power industry has encountered partial deregulation at the wholesale level, involving bulk sales of power from one utility to another. In 1992, the Energy Policy Act allowed dozens of independent power producers nationwide to sell bulk supplies of electricity to other power companies over existing transmission lines.

Now some state regulators are proposing that residential customers be given a choice of power suppliers -- just as they can choose long-distance telephone providers -- and industrial customers are bargaining for lower rates from competing power suppliers.

According to Poindexter, there has been more merger activity in the electric power industry over the past 12 months than over the previous 15 years.

In May, Northern States Power Co. in Minneapolis and Wisconsin Energy Corp. of Milwaukee announced that they would merge to create the 10th-largest utility. And last month, Union Electric Co. and Cipsco Inc., two major utilities in the Midwest, said they would merge to serve customers in Missouri and Illinois.

"Merging BGE and Pepco makes a lot of sense," said Thomas E. Hamlin, an analyst with Wheat First Butcher Singer in Richmond. "It takes two companies that were below average in size and basically doing the same things and creates one that has the critical mass necessary to compete more effectively in a new environment."

Although BGE will hold a slight majority on a new board of directors, Poindexter said the proposed merger was more of a "strategic business combination" than a takeover of Pepco by BGE.

Alex Hart, an analyst at Ferris, Baker Watts Inc. in Baltimore, said the two utilities may have acted in part to prevent nearby companies from targeting them for a takeover.

Hart said that Pepco's earnings growth has been lackluster and without the benefits of a merger the company may have come under pressure to cut its dividend. The new company will adopt BGE's dividend policy, which has been to increase dividends in recent years.

Although BGE's earnings and dividend growth appear to be strong, the Baltimore company may have felt that expanding its customer base would make it less vulnerable to a takeover, Hart said.

Poindexter said he called Maryland Gov. Parris N. Glendening (D) Sunday night to alert him to the impending merger announcement.

"The governor called me back and said, It sounds like this will put us in the size and range to make it harder for someone to come in and take the company over.' "

Poindexter and Mitchell said they had had friendly negotiations that grew naturally out of a long relationship between the two companies, which share in a regional power pool.

Their agreement calls for shareholders of BGE to receive one share of stock in the new company for each share of BGE common stock owned. Holders of Pepco common stock will receive 0.997 share of stock in the new company for each share owned. This means that Pepco shareholders will receive a premium of about 20 percent, based on the relative prices of the two stocks, executives said.

"I think the customers and Pepco shareholders will be the first and second winners in this," said Ron Tanner, an analyst with Legg Mason Wood Walker Inc. in Baltimore.

"Then come the Baltimore shareholders as winners in third place," he said. BGE stock fell $1 a share yesterday to close at $25.13 on the New York Stock Exchange, and Pepco rose $1.75 to close at $23.25. CAPTION: THE COMPANIES' SERVICE AREAS (This graphic was not available)