Beginning on Wednesday, people who are caught with small amounts of marijuana in Harris County, Texas, will no longer earn a trip to jail.

Under the new policy, announced last month, police in Texas’ most populous county will instead offer four-hour drug education classes to anybody found with less than four ounces of marijuana. Harris County includes Houston, the fourth-most populous city in the U.S., with about 4.5 million residents.

Authorities will still arrest and prosecute cases when they find marijuana in school zones or in conjunction with other criminal behavior, and juveniles are not eligible for the program. But most low-level marijuana offenders will now avoid a trip to police station, won’t get booked into jail and won’t get a criminal record, as long as they complete the drug education course.

The classes cost $150, and financial aid will be available to people unable to pay. The county will pursue charges against those who fail to attend.

Defendants don’t miss work, they don’t go to jail, they don’t have to make bonds, they don’t have to pay lawyers, the courts are not congested with these cases and the jail is less crowded. Tom Berg, first assistant district attorney for Harris County, Texas

Officials say the new approach will save $26 million annually by lifting costs related to law enforcement, incarceration and the court system.

“When you have 10,000 cases on a 100,000-plus case docket that are simple marijuana possession cases, you look for smart ways to resolve those so that you can dedicate your resources to the really serious crimes,” Tom Berg, Harris County’s first assistant district attorney, told The Huffington Post.

The new policy will also mitigate costs that can pile up as defendants are caught in the legal system.

“Defendants don’t miss work, they don’t go to jail, they don’t have to make bonds, they don’t have to pay lawyers, the courts are not congested with these cases and the jail is less crowded,” Berg said.

The change comes as newly elected leaders in Harris County usher in a broader criminal justice reform agenda. District Attorney Kim Ogg and Sheriff Ed Gonzalez, both Democrats, campaigned on overhauling ineffective tough-on-crime policies and won their elections by substantial margins in November. Gonzalez and newly minted Houston Police Chief Art Acevedo, along with Houston’s Democratic mayor, Sylvester Turner, have expressed support for the new policy.

We're finding better more cost-efficient ways to address drug misdemeanors that benefit community, offenders while maintaining #publicsafety pic.twitter.com/RGAUPbpBqt — Sylvester Turner (@SylvesterTurner) February 16, 2017

Harris County, an ethnically diverse and politically purple bastion in deep-red Texas, has previously taken a more lenient stance on weed than many of its neighbors. In 2015, then-District Attorney Devon Anderson, a Republican, announced a policy intended to divert nonviolent first-time marijuana offenders found with less than two ounces of marijuana to treatment.

But a report last year found that in the first six months of 2016, officers in Harris County had made more than 1,000 arrests involving people with less than two ounces of pot, 98 percent of them people in poorer communities.

Small-time marijuana charges still appear to be disrupting people’s lives. The Texas Organizing Project, a nonprofit that promotes social and economic equality, published a video last year that showed Harris County court magistrates making harsh assessments against defendants facing relatively minor charges.

In one clip involving a woman arrested for a misdemeanor marijuana charge, a judge doubles her bail from $1,000 to $2,000 after she responds to the judge’s question by saying “yeah” instead of “yes.” The woman has to remain in jail until the conclusion of her trial unless she comes up with $2,000, or a portion of it, to pay a commercial bail bondsman.

Harris County’s new marijuana program shows how activists can promote criminal justice reform through local elections, says Tarsha Jackson, Harris County director of the Texas Organizing Project. Her group and other civil rights organizations in the Houston area supported Ogg and Gonzalez in November.

“We’ve had the same administration here for over 40 years, and crime has not decreased based on being tough on crime, it’s only increased,” said Jackson. “Now we’re bringing in a fresh set of minds that are looking at crime a different way ― not targeting low-level offenses or oppressed black and brown communities.”

“If it can happen in Harris County, it can happen anywhere,” she added.

Local leaders’ reform-minded approach has also invited criticism from other officials in Texas, where police across the state made 70,000 arrests for marijuana possession in 2013, according to FBI data.

Last month, Brett Ligon, the Republican district attorney in neighboring Montgomery County, assailed Ogg, saying her plan would make Harris County “a sanctuary for dope smokers.” Texas Lt. Gov. Dan Patrick (R) has since employed identical language in his criticism of Ogg.

We’re bringing in a fresh set of minds that are looking at crime a different way ― not targeting low-level offenses or oppressed black and brown communities. Tarsha Jackson, Harris County director of the Texas Organizing Project

Berg says these attacks are motivated more by politics than policy, and are examples of GOP officials pushing back against progressive victories in Texas.

“[District Attorney Ogg] is being responsive to the people who elected her,” said Berg. “The political message from Republicans is different from actual criticism of the policy.”

Supporters of draconian drug enforcement tactics may find themselves increasingly at odds with their constituents. Polling last month found that 83 percent of Texans now support legalizing marijuana for some use, while 53 percent support legalizing weed for any use.

Houston City Council Member Dwight Boykins has been one of the most vocal supporters of the county’s new marijuana program. He launched a “2nd Chance” job fair to increase employment opportunities for ex-offenders, and believes too many people are getting funneled into the criminal justice system. Boykins says it’s a human rights issue, not a political one.

“We all make mistakes, but by the grace of God, a lot of us just didn’t get caught,” he said. “You can’t turn your back on people because of a mistake they made in bad judgment.”