HARTFORD, Conn. (AP) — Connecticut’s drug laws will go from some of the most draconian in the country to some of the most lenient this fall when most drug possession crimes are reduced from felonies to misdemeanors, a change that’s increasingly finding common ground between Democrats and Republicans.

Possession of small amounts of hard drugs including heroin, cocaine and crack cocaine — crimes that currently could land an offender in prison for up to seven years for a first offense — would be dialed back to a misdemeanor. And a mandatory two-year prison term for possessing drugs within 1,500 feet of a school — a law decried by civil liberties advocates as among the worst in the country — will be eliminated.

The legislation approved with bipartisan support Monday is part of a movement in both liberal and conservative states to save hundreds of millions of dollars in prison costs by not incarcerating low-level, nonviolent offenders.

“The cycle our system currently encourages — one of permanent punishment — hurts too many families and communities,” Democratic Gov. Dannel P. Malloy, a former prosecutor who proposed the changes, said in a statement. “These are smart criminal justice initiatives that are working in states throughout the country — both red and blue.”

In May, Republican governors in Nebraska and Alabama signed new laws that will reduce future prison costs for each state by more than $300 million by not locking up so many people for committing minor crimes and possessing small amounts of drugs. Officials in several other states are considering similar measures.

Voters in blue-leaning California and officials in Utah —where Republicans control the governor’s office and the legislature — both approved making possession of small amounts of drugs including heroin and cocaine a misdemeanor in the last year.

Connecticut, which decriminalized small amounts of marijuana in 2011, now becomes the third state to make such a change, said Theshia Naidoo, senior staff attorney at the Drug Policy Alliance, a New York-based nonprofit group.

“People are reevaluating our punitive drug policies,” Naidoo said. “Clearly we’ve had over 40 years of imposing very harsh penalties.”

Thirteen other states classified possession of small amounts of drugs as misdemeanors when they wrote their drug laws years ago, Naidoo said. Those states do not include states that have legalized marijuana for recreational or medicinal use, but consider possession of other drugs felonies, she said.

Connecticut’s current law carries up to seven years in prison for a first conviction for possessing narcotics including heroin, cocaine and crack cocaine and up to 25 years in prison for third and subsequent convictions.

The new law, most of which takes effect Oct. 1, would reduce possessing small amounts of drugs to misdemeanors carrying up to one year in prison for a first offense. Judges will be able to suspend prosecutions for a second misdemeanor offense and order drug treatment. A third or subsequent misdemeanor conviction would be considered a felony carrying up to three years in prison.

The school-zone provision will still apply within 1,500 feet of a school and still require some jail time, but will now be classified as a misdemeanor with a maximum sentence of one year behind bars.

All 50 states have drug-free school zone laws, and at least seven have moved to reform them in recent years, according to The Sentencing Project, a research and advocacy group in Washington, D.C.

The new law also would speed up the parole and pardons process for those who have been convicted of felony drug crimes that will become misdemeanors.

Malloy said the law also addresses the problems of felony convictions making it hard for people to get jobs and housing, and low-level drug users in prison learning to become hardened criminals.

There are currently about 200 people in Connecticut prisons serving time for low-level drug possession and 300 more detained on bail in such cases, said Michael Lawlor, state undersecretary for criminal justice policy and planning. Lawlor said the new law should reduce that total of 500 people to near zero fairly quickly.

The state Office of Fiscal Analysis says the new law will save the state about $19 million in prison costs over the next two fiscal years and reduce Connecticut’s prison population by more than 1,100 inmates — a 7 percent decrease — in the next fiscal year.

The American Civil Liberties Union of Connecticut lauded the new bill, saying it will help address the country’s high imprisonment rate compared with other developed nations and the problem of the disproportionate number of minorities behind bars.

“We have been in a place for the past 20 years or so in Connecticut where we’ve essentially run a prison industry,” said David McGuire, legislative and policy director of the state ACLU chapter. “This bill is a great starting point. It shows the government understands that the criminal justice system is outdated, that you need to get people help instead of punishing them.”