An attempt by some pro-marijuana activists to release Massachusetts inmates previously convicted of marijuana possession is unlikely to get support from Beacon Hill's top politicians.

"I certainly wouldn't support rewriting law retroactively," Gov. Charlie Baker said Monday.

The Boston Herald first reported that minority rights activists and pro-marijuana activists are working with the ACLU and State Sen. Jamie Eldridge, D-Acton, to introduce a bill to release from jail people convicted of marijuana possession now that Massachusetts legalized recreational marijuana use. The bill would also erase the convictions of some people convicted of marijuana possession and sales.

But both Baker, a Republican, and House Speaker Robert DeLeo, D-Winthrop, sounded skeptical of the bill when asked about it on Monday. Baker said since Massachusetts decriminalized possession of small amounts of marijuana in 2008, most people arrested for possession are major drug dealers. There is also a process for someone to apply for a pardon or commutation if they feel the law was applied to them unfairly.

But Baker said he would never agree to rewrite laws retroactively. "That's not the way it's supposed to work," Baker said. "Most people know what the laws are, and they're expected to abide by it."

Lawmakers will be considering a comprehensive criminal justice reform bill this session, and DeLeo said he does not think the proposed marijuana bill will be part of that. DeLeo and Senate President Stan Rosenberg, D-Amherst, both said the bill must go through the general legislative process of being filed with a committee and having a public hearing.

DeLeo said it would "probably be very difficult" to consider a retroactive legal change.