The legislation, which passed just before 1:30 a.m. after more than 14 hours of debate, would repeal mandatory minimum prison sentences for several drug-dealing crimes such as selling heroin within 300 feet of a school; make those changes retroactive so dealers will be able to earn release weeks or months early; legalize sex between young teens close in age; raise the age of criminal responsibility from 18 to 19, the highest in the nation; and diminish the procession of fees, fines, and license suspensions that people accused or convicted of a crime often must endure.

“We have to lift people up, not lock people up,” said Senator William N. Brownsberger, the legislation’s top author, on the Senate floor. “We have to cut the chains that hold people down when they are trying to get back up on their feet.”

The Massachusetts Senate early Friday passed a sweeping bill that would upend state laws on crime and punishment, aiming to reduce the number of people ensnared in the thicket of the criminal justice system and ease the tough-on-crime approach of decades past. The vote was 27-10.

Advocates say the bill is a long overdue antidote to a poisonous bureaucracy that has unnecessarily ensnared generations of people — often poor, often black or Latino — in the criminal justice system.


However, many law enforcement officials warn the bill would soften crime laws to the point that it undercuts the pursuit of justice, ignore the interests of victims, and put at risk the sharp decrease in violent crime Massachusetts has seen since the early 1990s. The status quo, they say, is a far cry from other states’ Draconian systems of punishment and has, for the most part, served the state’s nearly 7 million residents well.

Nine of the state’s 11 district attorneys warned in a letter Monday against a “return to the old and discredited ways of the past.” They said that “many of the proposals contained in this legislation turn the clock back.”


And law enforcement officials — who hope the House of Representatives proposes a more prosecutor-friendly bill — point to the state’s relatively low incarceration rate as proof of Massachusetts’ more enlightened position.

In 2015, Massachusetts had the second-lowest imprisonment rate, with 179 sentenced prisoners for every 100,000 people, according to the federal Bureau of Justice Statistics. Nationally, 458 prisoners were sentenced to more than one year in state or federal prison per 100,000 US residents.

Thursday’s debate turned emotional at times.

Brownsberger, a Belmont Democrat and former defense lawyer, implored his colleagues to look to their conscience.

“I’m asking you, all of the members of this body, to do something extraordinarily difficult, which is to vote on deeply controversial issues,” he said, his voice repeatedly breaking with emotion. Brownsberger requested that his colleagues think as they vote of the “people who have limited alternative options in life and got down the wrong path,” he said. “And make decisions with those people in mind.”

But Senator Bruce E. Tarr, the GOP leader, responded that it’s essential to also keep the victims of crime in mind.

“There is a reason for incarceration, Mr. President,” Tarr said, speaking to Senator Stanley C. Rosenberg, an Amherst Democrat and proponent of the bill.

The state’s scourge of opioid overdoses serves as a key backdrop. Opponents say it’s the wrong time to ease mandatory minimum sentences for drug dealers who are dispensing misery and death across the state.


Proponents say it’s important to make sure low-level dealers, who are often addicts themselves, get help rather than time in prison. The current system, they say, is not working.

The bill changes drug penalties in both directions.

It would do away with several mandatory minimum sentences for drug offenses, such as trafficking up to 100 grams of cocaine or methamphetamine. That would give judges and parole board members much wider discretion on incarceration.

It would also make the changes retroactive, giving hundreds of dealers the chance to earn early release.

The bill would strengthen penalties for crimes such as trafficking the potent opioid fentanyl.

State Senator John F. Keenan, a Quincy Democrat, said “if you are somebody who in a very cold-hearted manner is making a business decision to put fentanyl on the street, knowing that it’s going to kill people, you deserve to go to jail, and you deserve to go to jail for a long time.”

But, Keenan said, if a person, with just enough drugs to get through the day and maybe a bit more, provides some to a friend, “they shouldn’t be locked up. That’s just not going to work. It just has not worked.”

The debate touched on other hot-button issues in the bill, including raising the age of criminal majority from 18 to 19. That change would mean all but the most serious offenses committed by 18-year-olds would likely be adjudicated in secret before a juvenile court judge.


Advocates say 18-year-old brains are still evolving, and it makes sense to treat high school-aged youth the same way in the criminal justice system. Senator Karen E. Spilka said that 18-year-olds deserve the chance to make mistakes and learn from their mistakes, and that raising the age would help reduce recidivism.

But opponents, including a Democratic and a Republican senator, expressed concerns about 18-year-olds having the same rights as 19-year-olds but not having to face the same penalties for the same crimes. Eighteen-year-olds can, after all, vote, sign contracts, and serve in the military, they argue.

An amendment that would keep the current system in place, with 18-year-olds being tried as adults, was rejected 20-17.

Among other provisions of the bill: so-called Romeo and Juliet language legalizing sex between teens close in age; forbidding parents from testifying against their children in almost all criminal and juvenile delinquency matters; increasing how often men in the state’s toughest solitary confinement get a hearing; and reducing driver’s license suspensions for nondriving events like missing a court appearance.

Debate in the Senate stretched late into the evening Thursday — and then into the first hours of Friday — as senators worked through more than 160 amendments. During lulls in the Senate chamber, as amendments were redrafted by staff, some legislators schoomozed with colleagues and lobbyists, others poked at their smart phones, while still others appeared to momentarily rest their eyes.


In the final tally, four Democrats — Senators Eileen M. Donoghue of Lowell, Kathleen O’Connor Ives of Newburyport, Anne M. Gobi of Spencer, and Michael F. Rush of Boston — joined the chamber’s six Republicans in voting against the bill.

The bill’s passage, longtime State House observers say, marks the starkest example yet of the state chamber’s decisive shift to the ideological left in recent years.

But from here, the legislation faces an uncertain future.

The more conservative House of Representatives, also controlled by Democrats, is poised to release its own omnibus criminal justice legislation, expected to be far less sweeping, in the coming weeks.

Governor Charlie Baker, a Republican, has expressed discomfort with several provisions of the Senate bill, and praised some current criminal justice trends like the 16 percent drop in the state prison population since January 2015.

But, coming out of the chamber as the clock inched toward 2 a.m., Brownsberger expressed optimism.

“I have a lot of confidence that the House is going to take this up,” he said. “I have a lot of respect for their intentions on this.”

Jim O’Sullivan of the Globe staff contributed to this report. Joshua Miller can be reached at joshua.miller@globe.com.