Maryland Gov. Martin O'Malley’s proposal to subsidize development of wind power along Maryland’s shore passed the Senate on Friday. (Patrick Smith/Getty Images)

After three years of debate, countless revisions and lots of downsizing, Maryland Gov. Martin O’Malley’s plan to subsidize development of offshore wind energy passed the state Senate on Friday, all but ensuring final approval in coming days.

The victory for O’Malley (D) on a signature environmental initiative came as his bill to repeal the death penalty advanced in the House of Delegates and as he inched toward support of a measure to legalize medical marijuana.

The passage of the offshore wind bill, which failed in each of the past two years, would allow Maryland to seek a private developer to build a field of giant turbines off the coast of Ocean City, perhaps by 2017.

To offset the higher-than-market-rate cost of producing the wind energy, each residential ratepayer in Maryland would be charged about a $1.50 a month once the windmills are built. Most businesses would pay a monthly surcharge of 1.5 percent.

The subsidy would add up to $1.7 billion over 20 years, analysts say, but to make the project viable, Congress would need to extend billions of dollars in additional federal tax breaks.

In the wake of the high-profile bankruptcy of Solyndra, the California solar power company that received $500 million in federal clean-energy loan guarantees, O’Malley’s offshore wind plan was met with heavy skepticism when it was first introduced in 2011. Additional questions surfaced about which developers would benefit and whether low-income families would be too burdened by the surcharge amid other tax and fee increases championed by O’Malley.

By shrinking the project to about 200 megawatts, a third of its original size, and therefore lowering the subsidy to about $1.50 a month, O’Malley found a winning number with lawmakers in Annapolis.

He cast the monthly charge as a small price to pay to help establish an industry that holds great potential for green energy but has been stymied by its multibillion-dollar upfront costs.

“There is an appropriate role of government in helping industry on that first step. . . . Economies of scale don’t happen by choice, they don’t drift here on the Gulf Stream,” O’Malley said in testifying on the bill before a Senate committee last month.

Outside the State House on Friday, O’Malley simply said that he was “elated” by the 30 to 15 Senate vote and looked forward to signing the bill.

Minor changes made by the Senate will require another vote in the House, but that chamber approved the plan by a wide margin last month.

Despite O’Malley’s push for offshore wind for much of his second term, this week marked the first time the measure made it to the Senate floor for a vote.

Republicans responded with a barrage of amendments, tying up a vote for three days.

“This is the dumbest idea ever. Never before have so many Marylanders paid for the benefit of so few,” said Senate Minority Leader E. J. Pipkin (R-Cecil). He said the bill was “the worst kind of corporate welfare” and would benefit offshore wind developers over others in the clean-energy market.

Pipkin and other Republicans also took aim at the way O’Malley’s office secured key Senate committee votes by promising strong requirements for minority business involvement in both the construction and investment phases of the project. Pipkin said that African American and Hispanic residents of Maryland would pay $660 million for the project. “They should be getting a better deal,” he said.

Sen. Thomas M. Middleton (D-Charles) led support for the bill on the Senate floor.

He argued that the legislature had made it a better plan by requiring independent analysis of developers’ proposals.

“We all admit, we all agree, it’s the most expensive energy out there,” Middleton said. “But this bill has had so much scrutiny that . . . the developers will have to demonstrate in the end that they provide a net benefit to the state.”

Shortly after the Senate vote, O’Malley’s bill to repeal the death penalty cleared another hurdle when as the House Judiciary Committee voted 14 to 8 to send the measure to the full chamber for consideration next week.

The action came just two days after the Senate passed the legislation, which would make Maryland the sixth state in as many years to abolish capital punishment.

Supporters are confident they have the votes to pass the bill on the House floor. The legislation would replace death sentences with life without the possibility of parole.

In another development Friday, O’Malley suggested that he would support a bill to legalize medical marijuana, crossing a bright line the law-and-order governor had previously set against legalizing pot use for any reason.

O’Malley was nonchalant about the change in an impromptu meeting with reporters outside the State House. The governor said he is deferring to his chief health adviser on the decision.

“I’m focused on other things this year,” O’Malley said in an apparent nod to his package of gun-control legislation and the proposed repeal of the death penalty.

O’Malley won the state’s top elective office more than six years ago on a reputation as a tough-on-crime Baltimore mayor. He has repeatedly opposed efforts to legalize marijuana.

Under a mandate issued by the General Assembly in 2011, however, the O’Malley administration was tasked with developing a model program for distributing marijuana for medical purposes.

On Friday, Joshua M. Sharfstein, O’Malley’s secretary of health and mental hygiene, testified to lawmakers that the administration could support a bill allowing academic medical centers in the state to operate medical marijuana “compassionate use programs,” beginning in 2016.

The centers would have to monitor usage and patient outcomes and publish the results.

“There’s a red-light approach that just says no; a green light that says approve and go ahead,” Sharfstein said. “We support the [academic study] bill because it’s a yellow-light approach” before any further legalization.

“We need to assess. . . . There are not proven benefits, but there are proven risks,” he said.

Kate Havard and John Wagner contributed to this report.