Like many jails across the country, the one in Montgomery County stands in as a de facto mental-health facility in its community. On any day, about a fifth of 600-plus inmates suffer from serious and persistent conditions such as schizophrenia, bipolar disorder or clinical depression.

Hoping to reduce that number, county leaders are moving closer to establishing two “mental health courts,” an increasingly popular way across the country to divert low-level offenders with mental illness from confinement.

“There’s a pretty good consensus from everybody in the system — judges, prosecutors, defense attorneys, police, people who run the jail — that for some people, treatment is better,” said Montgomery Circuit Court Judge Gary E. Bair, vice chairman of the county’s Mental Health Court Planning and Implementation Task Force, which submitted its report this month on creating the special courts.

Bair and others face two hurdles: winning approval from Maryland court administrators and finding $385,000 in first-year funding.

Both seem likely to come through to launch two programs: one in District Court, where misdemeanor crimes typically are adjudicated, and another in Circuit Court, which typically handles felonies.

The challenges of dealing with the mentally ill through policing and prosecution have persisted even as crime in the county goes down.

From 2011 to 2015, according to county officials, eight people with mental illness were arrested a combined 250 times. “We see people cycling through,” said Robert Green, the county’s director of correctional services.

They are treated at the jail, he said, but hardly in the comprehensive way in which they could be treated in other environments.

The mental-health issues that challenge law enforcement and the court were evident during the recent blizzard.

During a court session after the snowstorm, when a judge reviewed bond terms for recent arrestees, about half of the 26 people charged were ordered sent to a state psychiatric hospital for immediate, intensive psychiatric evaluation, said State’s Attorney John McCarthy, the county’s top prosecutor.

County police didn’t arrest many people during the storm, but many of those they did were homeless, suffered from mental illness or both.

He said local politicians favor kicking in funds for the initiatives. “We will be up and running by the end of the year,” McCarthy said.

Under the new system, the majority of mental health court participants — after being charged with crimes such as shoplifting, trespassing or vandalism — would be placed in the District Court program. Their charges would be on hold, and they would be required to come to court up to once a week. A judge and case manager would monitor their progress, with authority to demand that they keep up with specific treatment. If the participants successfully abide by those terms over 12 to 18 months, their charges typically would be dropped.

People charged with non­violent felony offenses such as burglary could participate in the Circuit Court’s mental health court program if there is agreement among the accused, prosecutors and defense attorneys.

Officials hope the diversions could improve an individual’s mental health before the person commits a violent felony or kills someone. “That’s too late for mental health court,” said Montgomery Circuit Judge John W. Debelius.

Stepping in early lends the weight of the court to the attempts to treat individuals because “the weight of the court puts them in front of mental health professionals,” said Gray Barton, a Maryland court official. “They’ll say, ‘Yeah, okay, judge.’ ”

Barton directs the state’s ­problem-solving courts department. His office monitors the four mental health courts now operating — one in Prince George’s County, two in Baltimore City and one in Harford County — and monitors drug courts throughout the state.

Mental health courts are by no means precision operations. Diagnoses and compliance can be difficult. But the longer the courts function, Barton said, the more they help unclog the legal system.

The courts, he said, cut recidivism by 20 to 25 percent in part because without them, the same people continue getting arrested without ever getting full treatment.

In Montgomery from fiscal 2011 to 2015, overall crime dropped and the average daily jail population fell by 32 percent.

Yet the number of arrestees who were determined to have immediate mental health needs more than doubled.

County officials attribute some of the increase to heightened awareness of illness. “We’re not taking any chances,” Green said. “We’re making sure we understand the condition of the person in front of us as best as we can.”

But he also thinks more arriving inmates suffer from mental illness. And he sees the challenges of confining them.

On average, he said, tasks take as much as three to five times longer with those inmates. Feeding an inmate, for example, can require a correctional officer at his side to make sure he finishes his dinner. As basic a task as walking down a corridor takes additional supervision.

“These are tough cases to manage in a jail and tough cases to watch unfold,” Green said.

Mental health court is seen as a better option for inmates released but serving under standard probation programs. Their supervising agent may see them once a month, notes Montgomery District Judge Eugene Wolfe, which can be too late if someone has stopped taking medication or stopped going to therapy.

“They need immediate attention and constant supervision,” Wolfe said, “and I can’t do that in a regular court.”

As the top district judge in the county, Wolfe said he would carefully select which judges supervise the mental health dockets. Some have already expressed interest.

“I do think it takes a special person to do this type of court,” he said.