DURHAM, N.C.—Voters in two of North Carolina’s biggest counties turned out elected sheriffs and chose reform-minded district attorneys in Tuesday’s Democratic primaries. Those candidates inaugurate new experiments in liberal criminal-justice reform on a local level, as Democrats remain shut out of power in Washington.

In Mecklenburg County, home to Charlotte, incumbent Sheriff Irwin Carmichael was trounced, trailing two challengers, including winner Garry McFadden. District Attorney Spencer Merriweather, who was running for the first time after being appointed last year, triumphed. In Durham County, Sheriff Mike Andrews lost by a lopsided margin to challenger Clarence Birkhead, while Satana Deberry defeated incumbent Roger Echols.

Each of these races had its own peculiar dynamics, but overall they show voters opting to get rid of incumbents and existing approaches in favor of new faces and tactics. Since the beginning of the Trump administration, criminal-justice reform has stalled at the federal level, as Attorney General Jeff Sessions pursues so-called tough-on-crime policies. In its wake, voters at the local level are finding ways to push for reform in their own communities.

In particular, this effort has focused on prosecutors. The biggest success for reformers is Larry Krasner, a defense attorney, activist, and gadfly, who shocked Philadelphia by being elected district attorney in 2017, though he is hardly alone among progressives who are seeking to become prosecutors in order to shake up practices on charging, bail decisions, and sentencing.

Deberry’s win in Durham was perhaps the most interesting victory of the four. Deberry, executive director of the North Carolina Housing Coalition, has no experience as a prosecutor, though she worked as a criminal-defense attorney earlier in her career. Deberry associated herself with Krasner—perhaps overly, as she was found to have cribbed heavily from Krasner’s website in the composition of her own. She won nearly 49 percent of the vote.

Deberry campaigned on reducing jail populations, in part by eliminating cash bail, becoming more selective about prosecuting certain crimes, and working to eliminate racially disparate arrests and enforcement.

Echols was seeking a second term. He had brought stability to the district attorney’s office after a string of disastrous prosecutors—most infamously Mike Nifong, who oversaw the Duke lacrosse case. Echols may have been hurt in part by his handling of prosecutions of protestors who tore down a Confederate monument in downtown Durham in August 2017. The DA’s office declined to pursue the most serious charges sought by the sheriff, but still brought the cases to trial. But after a single day’s trial, three defendants were acquitted in humiliating fashion for the district attorney’s office, and Echols pulled the plug. His attempt to split the difference alienated citizens on both sides.

The Confederate monument may have proven the coup de grace for Andrews, the Durham sheriff, too. He pursued the case aggressively, and asked for felony charges, but according to Echols didn’t gather sufficient evidence. But Andrews had plenty of other weaknesses with the increasingly progressive voters in Durham. His handling of county jails was the subject of widespread criticism, including cutting off face-to-face visits in favor of so-called video visitation. In March 2017, a 17-year-old killed herself in a county-jail cell, and state investigators concluded that deputies had failed to check on her regularly and had disregarded warnings that she might try to harm herself. She was one of several recent jail deaths.

Andrews, though a Democrat, also maintained what critics called a “friendly” relationship with Immigration and Customs Enforcement, voluntarily honoring “detainers,” in which ICE asks jails to hold inmates who are unauthorized immigrants for 48 hours. Cooperation is voluntary. Andrews made clear he would continue the practice. Birkhead said he would not. Andrews’s campaign Facebook page also cheered a racist Facebook post in the closing days of the campaign, though the sheriff himself disavowed it.

The sheriff’s race is a microcosm of several important currents in North Carolina and nationwide: racial divides and urban-rural divides, which are often intertwined. Andrews is white, and Birkhead, the former chief of police for nearby Hillsborough and at Duke University, is black. Birkhead dominated in the city of Durham, with its significant black and Hispanic populations, while Andrews won the rural, whiter precincts in the northern part of the county.

Immigration was an even more dominant force in the Mecklenburg sheriff’s race. Incumbent Irwin Carmichael, part of an increasingly rare breed of conservative white Democrat in his first term as sheriff, had worked even more closely with ICE. Mecklenburg County participates in the 287(g) program, meaning that every inmate at the county jail is screened for immigration status, and can be turned over for deportation regardless of the crime with which they’ve been charged. Critics contend that the program makes immigrant communities less likely to cooperate with law enforcement, and consequently increases the risk of crime.

Carmichael’s challengers, both of whom are black, opposed the program. McFadden is a former detective in the Charlotte-Mecklenburg Police Department; Antoine Ensley, who finished second, is Charlotte’s human-resources manager. Carmichael sought to appeal to votes in the Mecklenburg suburbs, appearing on Fox and Friends to defend the 287(g) program for a segment warning of “violent illegal immigrants.”

The Mecklenburg County DA’s race was between two reformers. Romain, a former public defender, charged that Merriweather, the incumbent, was too close to the system to change it. Although Merriweather, who won handily, is not a radical in the Krasner/Deberry mold, he has taken some steps to change the county’s approach on justice issues. He ordered that a deferred prosecution program, which critics labeled “pay to play” because it required a fee of up to $1,000, no longer require fines from nonviolent first-time offenders. He, too, has pledged to take on racially disparate enforcement. A study from the University of North Carolina at Chapel Hill last year found that “Black drivers are 150 percent more likely to be searched, and Hispanic drivers 78 percent more likely to be searched compared to white drivers” in Charlotte.

The choices by voters in both Mecklenburg and Durham stand to make both places much closer to so-called “sanctuary counties” that avoid cooperation with federal immigration enforcement, and the new holders of the district attorneys’ offices will have chances to experiment with new approaches to prosecution. The likely new policies will also bring these counties into conflict with the federal government and President Trump, who has singled out sanctuary jurisdictions for harangues and threats of federal retaliation, as well as potentially with the state government. The North Carolina General Assembly has steadily cracked down on local autonomy since 2011.

Crime rates have dropped significantly in the U.S., but there’s no single explanation for the drop. It’s also not immediately clear what the changes that people like Deberry seek might have on crime rates, and whether progressive voters who are eager to tinker will lose their nerve if there’s an increase in crime. With federal criminal-justice reform efforts stalled, however, the elections of progressive sheriffs and district attorneys, running for positions historically sought mostly by law-and-order types, will offer real-life experiments in what reforms can work.