CHICAGO — In the harshly lit gym of the Cook County jail, a complex of concrete and barbed wire on the city's West Side, five visitors sit at a plastic folding table. Five chairs face them.

An officer tells inmates to line up along a wall, then directs them one by one to sit down. That’s when the visitors — volunteers from the civic advocacy group Chicago Votes — start talking about the upcoming Illinois primary and helping the men who are interested to register for casting a ballot.

For the first time, the jail will be its own polling precinct in this month’s primary election.

More than four decades after the Supreme Court upheld the right to vote for people in pretrial detention, many Americans remain blocked from exercising that right because states don’t have procedures in place to allow access. Illinois is no longer one of them, with a new law requiring all jails to ensure that some 20,000 pretrial detainees have an opportunity to vote.

Most counties are complying by distributing absentee ballots upon request until the voter-registration deadline, but the law directs any jurisdiction of more than 3 million residents — which is only Cook County — to set up actual voting machines within a facility’s confines.

In Chicago, Sheriff Tom Dart is an enthusiastic supporter. The jail he oversees is the nation’s second largest. About 95 percent of its 5,700 inmates are awaiting trial, some of them for as long as a few years.

“I don’t know if there’s a heck of a lot more [than voting] that connects you to your community,” Dart said. “You’re connected because you’re engaged in the issues that matter in your community. You’re making your voice heard.”

The jail will have more than a half-dozen temporary polling locations supervised by the Cook County Clerk’s Office and Chicago Board of Elections, which expect much interest given the presidential campaign and contentious races for state’s attorney and a congressional seat. Voting will take place in the jail’s gyms, chapels, law library and other special spaces during the two weekends leading up to the March 17 election.

“Even though I’m not out there, I want better,” said 53-year-old Archie Collins, who is facing a drug charge. “So, whatever it takes to make this a better world, I got my hands in.”

It’s quite a turnaround for the jail, which was mired in controversy when Dart took office in 2006. Two years later, a federal Justice Department report identified systematic violations of inmates’ constitutional rights, including physical abuse by officers, inadequate medical care and dangerous building conditions.

Dart has since led significant operational changes and added features such as wood-fired pizza ovens, a beekeeping program and even a hydroponics system connected to the jail’s community garden.

“We’re at this unique point where so many of the things that are broken in our society are coming in,” he said in an interview. “We can put strategies together to try to address it that help human beings and save society tons of money.”

For the primary, the sheriff worked with Chicago’s public television station to air two-minute videos inside the jail on local candidates’ backgrounds and positions. He also invited educators to teach civics classes. This election cycle alone, Chicago Votes made 11 visits and registered nearly 1,500 inmates to vote.

“By the time we get done with this, the folks voting here are going to be more educated about the election and the candidates than the average voter,” Dart said.

More than 462,000 people who have not been convicted of a crime are locked up in local jails across the country, according to the Prison Policy Initiative. Advocates say preventing them from voting is a serious civil rights violation.

“We have no sound policy reason for excluding people in the criminal justice system from our voting and election systems,” said Ami Gandhi, senior counsel for the Chicago Lawyers’ Committee for Civil Rights. “The exclusion has happened purely so that people currently in power could hang onto their power and manipulate who is eligible to vote for their own political advantage.”

A county commissioner in Harris County, Tex., which includes Houston and one of the nation’s largest jails, proposed designating that facility as a polling precinct. But the plan, which lacked the force of law, stalled last year because of security, Internet connectivity and other logistical concerns.

Gandhi and a coalition of activists first took the issue to the Illinois General Assembly in 2018 with the backing of Juliana Stratton, a legislator representing part of Chicago at the time.

“I think this is an opportunity to make sure that people are restored to the community and have the full rights that are available to them,” said Stratton (D), who is now lieutenant governor. “Voting is one of those rights.”

The “Voting in Jails” bill cleared both chambers but was vetoed by then-Gov. Bruce Rauner (R). He told lawmakers that while he supported “expansion of access,” requiring jail officials to take part in voter registration and education efforts exceeded “the legitimate role of law enforcement.”

Undeterred, supporters reintroduced the bill in 2019 after Gov. J.B. Pritzker (D) took office. It passed overwhelmingly, and Pritzker signed it into law in August.

State Sen. Omar Aquino (D), the measure’s sponsor, said that while other states put up new barriers to voting, “it’s quite progressive of the state of Illinois to do the opposite.”

Illinois is among 17 states that prohibit only those serving a sentence from voting. Upon a prisoner’s release, voting rights are automatically restored.

Yet even explicit voting protections often fall short in practice, noted Danielle Lang of the Campaign Legal Center, a D.C.-based national nonprofit that supports greater access to voting. “Unlike some other voting barriers that you might consider to be traditional red state-blue state issues, issues around access to voting in jail are endemic in most states.”

Legislatures nationwide have long imposed policies that can suppress minority participation, often intentionally. More than a dozen states have restrictive voter ID laws, including several with tough photo ID rules, according to the Brennan Center for Justice. Some election officials have aggressively purged voter rolls, especially in states with a history of discrimination, a 2018 Brennan Center report detailed.

Florida voters went the other way that year, approving a constitutional amendment that automatically restored voting rights to nearly 1.4 million residents who had finished serving felony convictions. But Republican lawmakers subsequently passed a measure requiring that ex-felons repay all court-mandated fees before registering to vote — a move that some activists labeled a modern-day poll tax.

The state’s Supreme Court upheld the law in January, blocking many people from taking part in the presidential primary there on March 17. A federal appeals court has declared the law unconstitutional, but for now its ruling applies only to the 17 plaintiffs who brought the suit.

And on Tuesday, a federal appeals court ruled that Ohio election officials don’t have to provide absentee ballots to individuals jailed after the deadline for requesting such a ballot. By comparison, people hospitalized because of an accident or medical emergency can still ask for an absentee ballot through part of Election Day.

Illinois may become a model — or inspiration — with its new law. “I think everybody’s looking at that law now as the standard,” said Chiraag Bains, legal strategies director at the liberal think tank Demos.

Among those closely watching its implementation is Elly Kalfus, an organizer with the Emancipation Initiative in Massachusetts. Kalfus led a vote-by-mail campaign in jails there in 2018 and lobbied state lawmakers for a bill similar to the one that passed in Illinois. That bill is still pending.

People who experience the criminal justice system as defendants have typically been excluded from policy discussions, she noted. “Once people in jail are actually allowed to vote, that could potentially change things.”

Cook County and Chicago election officials don’t anticipate any technical problems when inmates head to the jail’s polls. The sheriff says their voting will be a major step forward. But there’s much more to do, in his view.

“The only thing that keeps me here,” Dart said, “is if we take these ideas of ours and spread them to the rest of the country.”