Many law-abiding citizens understandably favor this maxim on how to handle dangerous criminals: “Lock ’em up and throw away the key.”

But prison inmates, even those guilty of the most heinous crimes, are legally entitled to adequate health care — something difficult to deliver to a difficult population. Staffing in correctional facilities is limited, and prison guards receive limited training to identify medical emergencies.

Further, inmates as a rule are not a healthy group. Many come in with drug and alcohol addictions and medical conditions that can accompany a hard life of crime. And some inmates fake medical problems as a way to be moved out of their cells to an infirmary or hospital.

These challenges are illuminated by two wrongful death complaints against the Berkeley County Jail now making their way through the courts. Both claim that the jail failed to recognize and treat ailments that led to inmates’ deaths.

A judge will determine whether negligence led to David Woods’ fatal gastrointestinal bleeding and Michael A. Woods’ suffocation with seizures from alcohol withdrawal.

Post and Courier reporter Dave Munday also reported Monday that since 1995 the Charleston County Jail has been sued at least twice after inmates died, and the Dorchester County Jail has been sued once.

So while jails and prisons are among the last places taxpayers want to see their money go, they should not be given short shrift.

Morally, legally and realistically, the government is responsible for the people it incarcerates.

While lawsuits against jails and prisons are not unusual, and while the current cases in Berkeley County are still unresolved, the complicated issue of dealing with sick inmates clearly requires serious attention. Are prison staffers trained adequately to handle medical emergencies? Are medical clinics hired by jails and prisons doing their jobs well?

If the answer to either question is “no,” taxpayers could pay a high price when things go terribly wrong.

Law enforcement officers don’t have the option of arresting only healthy people. Judges must convict people whether or not they are sick.

And our civil society has both and ethical and legal responsibilities to treat prisoners humanely — including providing adequate medical treatment.