If Mr. Gaddis had been caught 20 miles to the east, in Cincinnati, he would have received a maximum of six months in prison, court records show. In San Francisco or Brooklyn, he would probably have received drug treatment or probation, lawyers say.

But Mr. Gaddis lived in Dearborn County, Ind., which sends more people to prison per capita than nearly any other county in the United States. After agreeing to a plea deal, he was sentenced to serve 12 years in prison.

“Years? Holy Toledo — I’ve settled murders for a lot less than that,” said Philip Stephens, a public defender in Cincinnati.

Dearborn County represents the new boom in American prisons: mostly white, rural and politically conservative.

A bipartisan campaign to reduce mass incarceration has led to enormous declines in new inmates from big cities, cutting America’s prison population for the first time since the 1970s. From 2006 to 2014, annual prison admissions dropped 36 percent in Indianapolis; 37 percent in Brooklyn; 69 percent in Los Angeles County; and 93 percent in San Francisco.

But large parts of rural and suburban America — overwhelmed by the heroin epidemic and concerned about the safety of diverting people from prison — have gone the opposite direction. Prison admissions in counties with fewer than 100,000 people have risen even as crime has fallen, according to a New York Times analysis, which offers a newly detailed look at the geography of American incarceration.

Just a decade ago, people in rural, suburban and urban areas were all about equally likely to go to prison. But now people in small counties are about 50 percent more likely to go to prison than people in populous counties.

The stark disparities in how counties punish crime show the limits of recent state and federal changes to reduce the number of inmates. Far from Washington and state capitals, county prosecutors and judges continue to wield great power over who goes to prison and for how long. And many of them have no interest in reducing the prison population.

“I am proud of the fact that we send more people to jail than other counties,” Aaron Negangard, the elected prosecutor in Dearborn County, said last year. “That’s how we keep it safe here.”

He added in an interview: “My constituents are the people who decide whether I keep doing my job. The governor can’t make me. The legislature can’t make me.”

But many criminal justice experts say that the size of the disparities undercuts the basic promise of equal protection under the law.

“Letting local prosecutors enforce state laws differently throws all notions of equality under the law out the window,” said Peter Wagner, executive director of the Prison Policy Initiative, which advocates reducing incarceration rates. “This data puts governors and legislative leaders on notice that if they want to put criminal justice reforms into effect, they need to look at how prosecutors use and abuse their discretion.”

The analysis is based on previously unpublished data from the Department of Justice on state prisons, which hold the vast majority of American inmates sentenced to a year or more.

The divide does not appear to be driven by changes in crime, which fell in rural and urban areas at roughly equal rates, according to the F.B.I. Instead, it reflects growing disagreement about how harshly crime should be punished, especially drivers of the criminal justice system like theft, drugs, weapons and drunken driving.

Cities have adopted a more lenient approach to drug offenses in particular, diverting many low-level drug offenders to probation or treatment rather than to jail.

Those choices have started to reverse — if only modestly — longstanding racial disparities in American prisons, where blacks and Hispanics are incarcerated at drastically higher rates than whites. The annual number of new black prison inmates fell by about 25 percent from 2006 to 2013, and the number of Hispanic inmates fell by about 30 percent, while the number of new white inmates fell by only about 8 percent, according to the most complete federal data.

The number of black prisoners is still “shockingly high,” said Marc Mauer, executive director of the Sentencing Project. “Nonetheless, these numbers are encouraging. It suggests that this is not necessarily an intractable problem.”

But rural, mostly white and politically conservative counties have continued to send more drug offenders to prison, reflecting the changing geography of addiction. While crack cocaine addiction was centered in cities, opioid and meth addiction are ravaging small communities like those in Dearborn County, where 97 percent of the population is white.

Image

“I am proud of the fact that we send more people to jail than other counties,” said Aaron Negangard, the prosecutor in Dearborn County, Ind.CreditTy Wright for The New York Times

A collection of small, quiet towns near the Ohio River, Dearborn County does not look like a prison capital. Violent crime is rare. There are few empty storefronts. And local officials, flush with money brought in by a popular local casino, have built a convention center and a high school football field fit for a movie set.

But the extraordinarily high incarceration rate here — about one in 10 adults is in prison, jail or probation — is driven less by crime and poverty than by a powerful prosecutor, hard-line judges and a growing heroin epidemic.

Opioid addiction spread early here. Mr. Negangard, the prosecutor, has fought the heroin crisis by aggressively going after drug crimes.

Mr. Negangard has faced few obstacles to getting more convictions. He supervises his own police force, an unusual arrangement that allows him to investigate and prosecute most of the county’s serious crime. The police go after even minor drug cases, often offering to dismiss drug possession charges in exchange for information on friends or family members who sell drugs.

Probation officials are just as strict. Offenders released on probation are tested for drugs frequently, and hundreds of people who violate the terms of their probation have been sent to state prison in the past few years.

By 2014, Dearborn County sentenced more people to prison than San Francisco or Westchester County, N.Y., which each have at least 13 times as many people.

“It’s government run amok,” said Douglas A. Garner, a local criminal defense attorney.

Lawmakers in Indiana, concerned about the rising cost of incarceration, enacted a law that reduced criminal penalties starting in 2014 — one of at least 40 states to approve measures to reduce incarceration in the past few years. The bill was signed into law by Gov. Mike Pence, now the Republican vice-presidential nominee.

But the new rules, which Mr. Negangard fought, have done little to curb incarceration rates in Dearborn County.

Mr. Negangard said the long sentences here are the envy of police officers in Cincinnati. If a suspect is willing to sell drugs in Dearborn County, the Cincinnati police will help steer the case here, where greater punishment is almost assured, he said.

One Cincinnati man, Scott Huy, drove from Cincinnati to Dearborn County in 2013, enticed by a heroin deal set up by a police informer. Mr. Huy had already been convicted of drug trafficking twice in Ohio, for which he had served a total of five years in prison.

After Mr. Huy sold seven grams of heroin to an undercover officer, he was sentenced to serve 35 years.

Lawyers here have a term for when defendants like Mr. Huy realize the geographic disparity: “sticker shock.”

Defense lawyers outside Dearborn County respond with disbelief as well.

“That is so far out of line with the crime itself and any common notion of decency,” Jeff Adachi, San Francisco’s public defender, said of Mr. Huy’s sentence.

The rural resistance to lighter penalties goes beyond Indiana.

Prosecutors in New York City have sharply cut incarceration rates in part by diverting drug offenders from prison after state changes encouraged paths to treatment. But in the rest of the state, prosecutors and judges continue to put drug offenders in prison at a steady flow.

In Texas, a series of changes intended to cut the prison population led to large reductions in new prisoners from Houston and Austin. But the rest of the state has had only modest declines.

Court systems and jails in many populated areas are overcrowded, putting pressure on judges to offer probation. A federal court ordered California to reduce chronic prison overcrowding in 2009, leading to the largest declines in admissions in the country. Low-level offenders are now released on probation or diverted to local jails.

Image

The vast majority of the 250 inmates in the Dearborn County jail have a drug addiction, but treatment programs can only serve about 40 of them.CreditTy Wright for The New York Times

At the same time, cities tend to have more resources to fight addiction outside of jail and prison. In Cincinnati, most people who are caught with small quantities of drugs are charged with a crime but are diverted to drug court, where they are placed in an outpatient treatment program, said Mr. Stephens, the public defender. If the offender completes the program, the charge is dismissed.

“People are trying to work with it here in Cincinnati so it doesn’t overwhelm the justice system,” Mr. Stephens said.

In smaller counties, prisons are often the only well-funded response to a range of social ills, including drug abuse and mental illness.

To handle the expanded caseload, Dearborn County officials spent $11.5 million to double the size of the local jail and approved $11 million more to expand the county courthouse.

But money for drug treatment is scarce. At least 225 of the 250 inmates in the Dearborn County jail have a drug addiction, estimated Jonathan L. Cleary, a county judge. But drug treatment programs can serve only about 40 of them.

Mr. Negangard said he wished the county could find more money for drug treatment. But he said about half of all addicts in prison had a criminal mind-set and would keep committing crimes whether they got clean or not.

“We can’t just let the bad guys go,” he said.

Correction:Sept. 3, 2016

An Upshot article on Friday about a boom in prisons in mostly white, rural and politically conservative areas referred incompletely to the sentencing of Donnie Gaddis, who was charged with selling oxycodone pills to an undercover officer. While Indiana law required him to serve 12 years, he was sentenced to 16 years, not to 12.

Correction:Sept. 14, 2016

An earlier version of a map with this article misstated the per capita prison admissions numbers for New Mexico counties. Most counties overstated the admission rate, while Otero and Luna Counties understated the rate. The average admission rate in New Mexico is 18.23 per 10,000 people, not 20.09.