For more than a decade, authorities have pushed for a trail-blazing treatment facility that could spare Miami’s mentally ill from the county jail’s notoriously nightmarish psychiatric ward.

Finally, the plan might become reality.

The Miami-Dade County Commission this month gave a preliminary OK to fast-track design and construction for a new Mental Health Diversion Facility, with final approval expected during next week’s meeting.

That means construction crews by early next year could begin retrofitting a sprawling, shuttered hospital on Northwest Seventh Avenue slated to become a “one-stop shop” rehabilitation facility. It will include a crisis unit for unstable patients, short-term housing, a courtroom and therapeutic efforts such as space for a culinary classes.

Unlimited Digital Access: Only $0.99 For Your First Month

“It shouldn’t have taken this long to get this facility open,” said Miami-Dade County Judge Steve Leifman, who has spearheaded planning for the facility. “Countless people have died waiting for this building to open.”

Advocates say a comprehensive facility is critical for a county where thousands of people, particularly the homeless, suffer from acute mental illnesses and are constantly jailed and then released onto the streets with little treatment.

Miami-Dade County Commissioner Sally Heyman, who sponsored the ordinance expediting plans, said the facility demonstrates a “more humane commitment by Miami-Dade County.”

“Our jails need to incarcerate people to assure public safety, not confine those with mental illness,” she said.

More than anywhere in the state, the cost of mental-health services in Miami-Dade is staggering.

The Florida Mental Health Institute, in one recent study, identified 97 chronic offenders who over five years accounted for 2,200 arrests, 27,000 days in jail, plus 13,000 days in crisis units, state hospitals, and emergency rooms. The costs to taxpayers for them alone: nearly $13 million.

In Miami-Dade jails, some 1,400inmates take some sort of psychiatric drugs, making the corrections system the largest warehouse for people with mental illnesses in Florida. Mental healthcare at the jails costs taxpayers $80 million per year — or about $218,400 a day.

It’s been the subject of numerous investigative reports by the Miami Herald, other media outlets and outside agencies.

Twice, in 2004 and 2008, Miami-Dade grand juries blasted the ward’s deplorable conditions. In 2011, the U.S. Department of Justice, after a sweeping investigation, declared: “Rather than being therapeutic, the [mental health] wing is chaotic, crowded, foul-smelling, depressing, and unacceptable for housing prisoners who are mentally ill or suicidal.”

The jail system has been under federal supervision since the 2011 report.

Just last year, a homeless schizophrenic man named Joaquin Cairo, who was housed on the ninth floor, died after he was injured during an altercation with another inmate. His charge: misdemeanor criminal mischief; prosecutors are still investigating whether he received proper treatment for his injuries.

For the new facility, taxpayers first set aside $22.1 million in 2004 when they approved the massive $2.9 billion Building Better Communities bonds.

The new facility will be housed at 2200 NW Seventh Ave., which was once home to the South Florida Evaluation and Treatment Center, a locked-down facility for defendants too mentally unstable to stand trial on criminal charges. The seven-story, 170,000 square-foot building closed in 2008 when the state privatized mental health treatment for criminal defendants.

Local officials targeted the building for the new mental-health facility, and the state agreed to lease the facility to the county for just $1 a year — a sum Judge Leifman insists he will pay himself.

For the the better part of the past decade, the efforts to overhaul the county’s treatment of mentally ill offenders have been mired in bureaucracy. The Miami-Dade’s corrections department, several years ago, also tried unsuccessfully to take control of the building to house its mentally ill inmates.

On a recent weekday, Leifman gave a tour of the building to officials from Camillus Health, a branch of the Miami homeless shelter that deals with many of the same people who end up in and out of jail. The shelter’s health wing might one day have a satellite office in the new facility.

Even on this visit, the need for services for the mentally illnesses is glaring. A homeless man named Amos Moss, escaping the constant drizzle, lay his head on a backpack, shoes off, reading shreds of old newspapers.

Moss, who suffers from schizophrenia, risked being arrested for trespassing on county property. Instead, after much cajoling, the judge and clergy from the Camillus House convinced him to go to to the shelter for the night.

“That sounds great,” Moss said with an enthusiastic smile.

When the mental-health facility opens, Moss would be able to walk in and get counseling, access to medication, vocational training, or assistance ironing out his government benefits.

The facility won’t be a jail. But if he were arrested, a judge in an on-site courtroom — after examining his criminal history — on the spot might enter him into mental health diversion program in which a charge is dropped if he completes certain treatment.

Much of the costs of the services offered at the building are expected to be covered by a patient’s federal and state benefits.

For now, the old psychiatric hospital remains a frozen-in-time reminder of how the criminal justice system handles offenders with mental illness.

Barbed wire still snakes atop the massive walls of the building. Inside, masks and restraints used to “extract” raging patients from their rooms remain in locked case. A SWAT-style plastic shield strangely sits atop a metal counter in the sprawling kitchen.

Guard stations loom dark with blank security monitors and control panels. A display board feature bullets, a makeshift gun, and an assortment of pipes and shanks — all contraband items seized by guards.

The walls are painted in bright, bold colors. When renovation begins, the barbed wire will be stripped, the colors changed to muted pastels.

“We want to get that institutional feel out of here,” Leifman explained to the visitors. “You can’t make it too bright. It’s not good for them.”

Up on the second floor, down a water damaged hallway, will be rooms to house between 16 and 32 beds in a crisis unit. Under the state’s Baker act, police will bring in people who pose a threat to themselves or others.

The facility will feature 168 beds of residential treatment where patients can stay for up to 90 days while they receive help for integration back into society, efforts overseen by case managers and in some cases, probation officers.

Another hallways leads to a large basketball court — and a well maintained outside grassy courtyard area.

“This could be horticultural, or a garden,” Leifman said. “There are a million activities we can have outside.”