John Rowe made no secret of the fact that he badly wanted a signature merger to top off his career as the chief executive of Exelon Corp. How badly can be seen in the settlement he just agreed to in Exelon's bid to purchase Baltimore's Constellation Energy.

He'll get his buyout, which will deliver about $7.9 billion to Constellation shareholders. But he'll end up paying close to $1 billion on top of that in energy projects and other benefits to assuage Maryland politicians and regulators, who have a history of blocking these transactions.

According to the settlement leaked Wednesday, Exelon will build carbon-free and low-carbon energy generation facilities for Maryland — largely at the company's expense, in a state that needs new generation — beyond anything expected by analysts who follow the companies.

Working through his staff outside the normal regulatory process, Gov. Martin O'Malley also got important concessions from Exelon that will protect Baltimore Gas and Electric from harm if the parent company runs into trouble. (BGE is owned by Constellation and would end up as an Exelon subsidiary.)

If one of Exelon's nuclear reactors melted down and the company went bankrupt, for example, Maryland regulators could order the company to sell BGE.

Some will gripe that the new deal, negotiated in recent days and nailed down this week, doesn't give BGE customers any additional credit beyond the $100 per household that Exelon first offered. But O'Malley's obsession these days seems to be renewable energy, not what's paid by electricity customers. (Ratepayers were his first-term schtick.)

In any event the deal is as good as done. The Public Service Commission must formally approve it. But O'Malley got better terms than the commission probably could have. Expect the panel to accept Exelon's newest offer in January, maybe with a sweetener for electricity customers. An additional $25 in rate credits, perhaps?

Exelon is no angel. Like many generation companies, it benefits from a flawed wholesale electricity market. It paid a huge fine in Illinois to settle allegations that it was manipulating prices. Its dismantling of a nuclear plant outside Chicago looks like a cynical exercise in suppressing supply and driving up profits at its remaining generators.

Don't be taken in by the claim that the sale of one of Baltimore's most important companies will create 6,000 jobs for Maryland. Many of those are temporary construction jobs related to the generation projects or building a headquarters for the Baltimore branch of the combined company. Many corporate jobs at Constellation will disappear because they have duplicates in Exelon's Chicago headquarters.

But Constellation hasn't been a perfect electricity steward, either. The deal is decent for Constellation shareholders, of which there are many in Maryland.

At the same time, the conditions obtained by O'Malley furnish green and near-green energy in ways that should diminish the power of the combined company to push up wholesale electricity prices. They also increase the grid's capacity to support a growing economy. And they push the state in a small but significant direction toward cutting carbon emissions.

Exelon initially offered to build 25 megawatts of unspecified green generation capacity — about enough to power 25,000 households, assuming that the wind is blowing vigorously and the sun shining brightly.

O'Malley got the company to increase that as much as sevenfold and add a gas-fired plant besides. Some of these might be paid for with PSC approval by building costs into customer rates. Most, however, would be built on Exelon's own account.

Exelon agreed to put a solar-generation facility of 30 megawatts in Baltimore or nearby. That alone could cost up to $150 million and double the state's solar capacity.

The company will build an additional 125 megawatts of other green generation, probably wind turbines, at a cost of nearly $300 million. Exelon also will contribute to the construction of a generation plant on the Eastern Shore of up to 25 megawatts that would be powered by poultry manure.

O'Malley even got Exelon to contribute to his separate (and dubious) $1.5 billion proposal to build 400 to 600 megawatts of windmill capacity off the Atlantic coast. Rowe promised to write a $30 million check to finance a development plan for that project.

On top of that, the company will construct a natural gas-fired generation plant of 120 megawatts at a cost of more than $100 million. Natural gas emits far less carbon dioxide and poisonous pollutants than the traditional generation fuel, coal. (As a whole, Maryland burns about 14,000 megawatts on a hot summer day.)

Maryland has been waiting for years for energy companies to build significant new generation capacity. Only when a $7.9 billion merger and a retiring executive's legacy were at stake did the commitments finally get made.

O'Malley read Rowe's cards very well. But Rowe is getting what he wanted, too.