Heroux, who will be stepping down as Attleboro’s mayor in January to become sheriff, promised to improve living conditions in the county’s jails, overhaul rehabilitation programs for inmates, and begin measuring whether these programs actually reduce recidivism. Prior to becoming mayor, Heroux had worked as an administrator at a jail system in Philadelphia and the state prison system in Massachusetts.

Preliminary election results show Heroux’s victory was buttressed by a major shift in how cities and towns voted in the northern part of Bristol County, where Heroux’s hometown of Attleboro is located. Suburbs like Mansfield, Easton and North Attleboro, once strongholds that shored up Hodgson’s previous election campaigns despite weaker returns in the county’s cities, flipped to voting Democratic in the 2022 sheriff’s race.

“I think that with Hodgson having been there for 25 years, with the constant controversies, people are just ready for change,” Heroux said after declaring victory early Wednesday morning.

Hodgson, a Republican who closely aligned himself with Donald Trump before and after the former president’s campaign in 2020, conceded the sheriff’s race around 1:15 a.m., saying he accepted the results.

“This has been a great run for me," Hodgson said. "Twenty-five years as sheriff the people of this county have given me their trust and their honor to serve, and I couldn't be more grateful. It's now time to turn the page for the people of the county as they decided they want it to be this way.”

Hodgson said he attributed his surprising loss to “the George Soros and Mike Bloomberg groups who put in half a million dollars that my opponent probably could never raised.”

In the weeks leading up to the election, Everytown for Gun Safety, a political action committee funded in large part by Bloomberg, spent close to $200,000 to support Heroux’s campaign. The Working Family Party, a PAC which Soros’s family has contributed to, spent about $180,000 to support Heroux. Heroux’s campaign separately raised about $175,000 on its own.

Next year, Heroux will be taking over the management of a county jail system with a fluctuating population of about 600 to 800 inmates, some of whom are housed in one of the oldest carceral facilities still operating in the United States.

For decades, inmates and their advocates have criticized the Bristol County jails for living conditions, medical services and mental health treatment they said were substandard. But Hodgson had not faced an election opponent in 12 years, a span during which many voters in America reevaluated how they perceive the criminal justice system.

During this year’s election campaign, Hodgson doubled down on his reputation as a tough on crime sheriff who takes pride in making life behind bars more difficult than it would be under a Democratic sheriff. Shortly after Hodgson was appointed sheriff in 1997 by a Republican governor, he took away the inmates’ gym and access to television. Hodgson also started charging inmates fees for haircuts and medical services and briefly reinstituted chain gangs.

A few years into his tenure, Hodgson sought to expand the role of what a sheriff traditionally does in Massachusetts. In 2003, for instance, Hodgson declared New Bedford a “killing field” and sent his deputies to patrol the city’s streets over the objections of the police chief and the district attorney. In 2017, he offered to send his inmates to the Mexican border to build the wall that Trump had promised.

During his quarter-century in office, Hodgson built up an unusual star power for a county sheriff in Massachusetts. In a survey released earlier this year by the American Civil Liberties Union of Massachusetts, 53% of Bristol County residents could identify Hodgson as their sheriff. The next highest was Franklin County at 33%.

But in recent years, this extra attention has come with more negative consequences. In the early days of the coronavirus pandemic, immigration detainees rioted at a facility Hodgson built during an earlier expansion of his county jail system. Hodgson’s efforts to subdue them led the Department of Homeland Security to end its contract with Bristol County after investigators found that Hodgson and his staff mistreated the immigrants involved in the uprising.

On Tuesday night, Hodgson framed the revocation of his contract with Immigration and Customs Enforcement as a political hit job that played a significant role in his election loss.

“I think it absolutely had an impact, no question about it,” Hodgson said. “And it was based on lies — all lies — it's all going to come out in the end.”

Ben Berke is the South Coast Bureau Reporter for The Public’s Radio. He can be reached at bberke@thepublicsradio.org. Follow him on Twitter @BenBerke6.