Adults caught with less than 10 grams of pot will get a citation that carries a fine, similar to a traffic ticket. They could no longer be sent to jail.

"As a young prosecutor, I once thought that decriminalizing the possession of marijuana might undermine the public will necessary to combat drug violence and improve public safety," O'Malley said in a statement. "I now think that decriminalizing possession of marijuana is an acknowledgment of the low priority that our courts, our prosecutors, our police, and the vast majority of citizens already attach to this transgression of public order and public health. Such an acknowledgment in law might even lead to a greater focus on far more serious threats to public safety and the lives of our citizens."

More than a dozen other states have decriminalized possession of small amounts of marijuana, as advocates push to treat minor drug offenses as a public health issue and not a crime.

The NAACP and the ACLU joined other advocates for a new approach to marijuana in arguing that current possession laws are unfairly applied. They pointed to studies showing that African-Americans who use marijuana are twice as likely to be prosecuted for the offense than their white counterparts.

The argument gained traction this year as key Democrats vying for governor embraced the idea, including Lt. Gov. Anthony G. Brown.

As recently as Friday, the proposal seemed to be dying in the House of Delegates, until the Legislative Black Caucus and others persuaded a key committee chairman to change course.

The House of Delegates passed the proposal Saturday with just seven votes to spare. Opponents argued that decriminalizing possession sent the wrong message about drug use. On Monday, the Senate voted 34-8 to adopt changes made by the House.

In a less controversial measure, the House revamped the state's medical marijuana program, which was approved last year but failed to get off the ground. It had relied on academic centers to administer medical marijuana, but none volunteered to do so. The new version would create a system of at least 15 private growers, dispensaries across the state and specially licensed physicians to prescribe the drug. All of it — plus scores more regulations — would be overseen by the state's medical marijuana commission.

Over the course of the session, lawmakers granted pay raises to future state lawmakers and the next governor by declining to overturn the recommendations of a special compensation committee.

Not many environmental bills passed this year, and environmentalists were largely fine with that. Republicans and some Democrats came to Annapolis vowing to repeal or revise the stormwater fee derided by critics as a "rain tax." More than a dozen bills to do that died in committee. At the last minute, though, a handful of lawmakers tucked a provision in a budget bill allowing Carroll and Frederick counties to skip the fee if they pledged enough money from their property tax revenues to pay for reducing polluted runoff in their communities.

Lawmakers also put language in the budget delaying a regulation opposed by Eastern Shore chicken farmers and the poultry industry that would curtail the use of chicken manure as fertilizer.

On energy, lawmakers helped one wind project while possibly killing another. One bill lets farmers who've sold their development rights lease up to five acres for renewable energy projects, including wind. Another imposes a 13-month moratorium on commercial wind projects across much of the state to protect a Southern Maryland naval air station.

O'Malley told reporters late Monday he was "trying to understand" why that bill was necessary when the Navy did not object to the project, though he stopped short of saying he would veto it.

The final day of the legislature brought to a close the careers of at least 49 lawmakers, 47 delegates and two senators, who did not file for re-election.

Sen. Norman R. Stone of Dundalk is retiring from the longest legislative career in state history, with 52 years in the legislature. The 78-year-old Democrat he said he had mixed emotions about ending his half-century in the State House.

"I've been doing it for so long," Stone said. "I'm going to miss it, there's no question about it."

Sen. Nancy Jacobs, a Harford County Republican who is leaving after two decades in the legislature, isn't just ending her Senate career. She's leaving Maryland for a Central Florida retirement community in January. "I'm going to be teaching tennis in Florida," she said. "The taxes are not only pushing out ordinary citizens, they're driving out legislators too."

The vast majority of lawmakers are about to kick into an even higher gear, as they race toward a primary June 24 — three months earlier than in the past.

"I can sleep on June 25," said Del. Jolene Ivey of Prince George's County, a Democrat running for lieutenant governor on Attorney General Douglas F. Gansler's ticket.

Del. Jon Cardin, who is running for the Democratic nomination for attorney general, likened the end of the session to breaking through mile 12 of a marathon, "and I'm going to be in a dead sprint for the next 78 days." Cardin said. "Getting home to see my family for dinner a few times a week is going to be the challenge."