SAN ANTONIO — It’s 11 p.m. on a Thursday, and this sprawling, twinkling city of 1.5 million people feels bigger than ever.

The 911 call transcript has just come across a laptop mounted on the dash of the police SUV: suicide-in-progress, northwest side.

A woman in her late 20s tried to hang herself in her bedroom. Her boyfriend walked in just in time, pulled her down, and hog-tied her while he called for help.

James Williams and Jon Sabo, partners in the San Antonio Police Department’s mental health unit, are way across town, having diffused an earlier crisis. They carve through side streets, speed bumps thumping underneath.

“It always feels like it’s forever to get there on a call like this,” Williams says from the driver’s seat.

EMTs are inside the modern brick house when Williams and Sabo pull up. Williams finds the boyfriend. Sabo heads for the bedroom.

A woman in a blue tank top and white athletic socks sits on a black folding chair. Minutes earlier she’d stood on that chair and put her neck through a slipknot hung from the ceiling rafters. The rope now lies at the foot of her unmade bed.

“I’m good,” she says to Sabo, her speech slurred. Her boyfriend overreacted to a Halloween joke, she says.

Sabo doesn’t buy it. He pries further, his gentle tone more social worker than cop. He learns that she struggles with alcohol, had attempted suicide before, and takes psychiatric medication. He’s leaning in close now, almost whispering.

“I really don’t think you’re good,” he says. “I think you know that. I really want to help. What’s going on?”

She’s tired of living, she says. She feels estranged from her family. She’s drinking again after several years of sobriety.

Erich Schlegel for The Boston Globe Jon Sabo (center), an officer with the San Antonio Police Department’s mental health unit, talks with a woman who had attempted suicide earlier that night.

The rapport Sabo builds with her yields precisely what he wants. She agrees to pursue treatment, even as she’s saying, “I don’t want to go.” Under Sabo’s watchful eye, she packs a small bag and walks to a patrol car waiting outside.

It’s not really her choice — Sabo and Williams are prepared to take her to the hospital against her will. But this peaceful, mediated outcome is why the mental health unit exists. They want people in crisis to submit to help, and to see police as partners in making that happen.

The seven-person police unit is just one piece of a larger behavioral health care system in San Antonio and surrounding Bexar County that’s widely considered to be a national model. Over the past decade and a half, San Antonio community leaders, government officials, law enforcement, judges, medical institutions, and the county mental health authority have made tremendous strides together in identifying and treating people with mental illness.

They’ve taken on many of the critical problems this Spotlight series has found still rampant in Massachusetts, including poor coordination among institutions, limited training for law enforcement, and dwindling options for care. They have acted aggressively and spent heavily, confident their investments would pay off. They’ve done what many Bay State advocates dream of, and one thing those advocates resist: taking decisions on treatment and medication out of the hands of the most severely ill.

This coalition in San Antonio has built a crisis center for psychiatric and substance abuse emergencies and a 22-acre campus for the homeless that resembles a community college. To date, more than 100,000 people have been diverted from jail and emergency rooms to treatment, local officials say, resulting in a savings of nearly $100 million over an eight-year period. Thousands of emergency responders in San Antonio and Bexar County have been trained to manage mental health crises.

Erich Schlegel for The Boston Globe Sabo accompanies the woman who had attempted suicide to a local hospital emergency room.

Local judges devised an involuntary outpatient treatment program for people resistant to help and special juvenile court sessions for teens struggling with mental illness. An alliance of mental health specialists set up a transitional clinic to make sure people released from hospitals have immediate access to therapy and medication. And in May, the county opened a $2 million reentry center designed in part to help mentally ill inmates transition to society.

“San Antonio is still way ahead of the curve,” said Ron Manderscheid, executive director of the National Association of County Behavioral Health and Developmental Disability Directors.

San Antonio’s system isn’t flawless. Tens of thousands of people still aren’t getting adequate treatment, according to the local head of the National Alliance on Mental Illness. Families have suffered tragedies as a consequence. And key changes in leadership this year and next will test the system’s resilience.

But it is actually a system, and with it San Antonio is leagues ahead of most of its peers. Law enforcement, health care, and mental health officials from across the country visit and consult constantly, eager to replicate the wise investments and collaborative spirit that have saved many lives and millions of dollars.

Massachusetts officials have begun paying attention, too, led by Middlesex Sheriff Peter Koutoujian, who last year began closely studying Bexar County’s success. Koutoujian plans to travel to San Antonio in January to see it for himself.

Perhaps no city or state in America has completely fulfilled the promise of seamless, sterling community care that accompanied deinstitutionalization of people with mental illness. But the vanguard lies here in San Antonio, an oasis of creativity and dedication in a state not known for progressive social policy.

Before its turnaround began about 16 years ago, Bexar County’s mental health authority was $6 million in debt, ridden with patronage hires, and at risk of being shut down by the state, said Roberto Jimenez, a prominent San Antonio psychiatrist to whom county leaders turned for help.

Employees were poorly paid and miserable. People with chronic mental illness were a common sight on San Antonio’s streets, Jimenez said. In 1998, the director of the county mental health department was arrested for indecent exposure and marijuana possession.

“Newspapers showed up because terrible things were happening here,” said Leon Evans, the man whom Jimenez would recruit to fix the system.

Evans — burly, magnetic, and insistent — had wrestled bears as a younger man. He’d changed the diapers of mentally retarded adults in Oklahoma. He’d run the mental health care system in Dallas and presided over community treatment for the state of Texas.

“They sent him everywhere to fix broken systems,” Jimenez said. “We convinced Leon to come and fix ours.”

Jimenez had notions of what he hoped they could accomplish. He’d trained in a city that, in the 1970s, was a leader in progressive, collaborative mental health care: Boston. He completed his residency at Boston State Hospital and what is now Boston Medical Center. He ran outpatient programs at Solomon Carter Fuller Mental Health Center and Massachusetts Mental Health Center. He returned to San Antonio in 1980, just as the treatment system in Massachusetts began to crumble for want of funds and commitment.

Trained as a clinician, Evans missed working with children and families. He saw San Antonio as a laboratory to try alternative, promising approaches to mental health care.

“I thought, you know, I’m getting old, this could be my last hurrah,” he said.

Erich Schlegel for The Boston Globe Leon Evans, who heads the mental health authority for San Antonio and surrounding Bexar County, speaks to representatives of the Las Vegas Police Department, who have come to study his methods.

Evans started in April 2000. The county mental health authority was rechristened as the Center for Health Care Services. Evans and Jimenez, who was chairman of the center’s board, began chasing money anywhere they could find it.

They got county leaders to raise taxes slightly — specifically to fund behavioral health. The annual tax revenue amounted to $1.6 million in 2001 and has grown to about $2.5 million, Evans said. Evans and the center also raised more than $6 million from AstraZeneca and other pharmaceutical companies. And Evans increased the time clinicians spent doing direct care, which brought in additional Medicaid money. (Today, Evans’s agency has an annual budget of about $104 million.)

There were cultural hurdles in the beginning, too. Police were skeptical of approaching mental health crises with more sensitivity, dismissing such training efforts as “hug-a-thug programs,” Evans said.

Jimenez and Evans needed political muscle to change things. At the time, the position of county judge — Bexar County’s chief executive — was opening up. County commissioners were expected to appoint Nelson Wolff, an influential former state legislator and San Antonio mayor.

Prior to Wolff’s appointment in 2001, Evans and Jimenez paid him a visit in the cramped office of a grocery store chain that Wolff ran with his family. They urged him to make mental health — specifically, keeping people with mental illness out of jail — a priority once in office.

As a lawmaker, Wolff had helped pass Texas’s first methadone bill. Now, as county CEO, he would have considerable power to do more. Wolff also understood that jailing people unnecessarily was a huge expense for the county.

“The idea that I had coming in here was . . . focusing on helping people rather than incarcerating them,” he said.

Wolff convened a health summit with San Antonio’s top decision-makers — hospital executives, lawmakers, law enforcement chiefs, business leaders — and built support for a stronger mental health care system. They began to see that smart, integrated care, beyond helping the sick, would mean fewer psychiatric patients clogging emergency rooms, less money spent on criminal justice, and a more tourist-friendly downtown.

Out of that initial gathering came regular meetings among everyone involved in behavioral health care and crisis response, from police and fire to ambulance crews, judges and school administrators. This consortium is still going strong today.

“We’ve built the culture,” said Gilbert Gonzales, a psychologist and director of the county mental health department.

Saving money was a key motivation. Bexar County was spending a fortune on its jail, which, bulging with almost 5,000 people, was over capacity. Early on, the county took at hard look at whom it was putting behind bars.

Mike Lozito, the county’s director of judicial services, said the county divided transgressors into two camps: “who do we fear” and “who are we mad at.” The first group belonged in jail, they figured. But how many of the others — the nonviolent offenders — could be set on a better course through treatment? How many future personal crises — and thus ER visits, court hearings, police encounters, and days in jail — could be averted?

Over a couple years, they developed a jail diversion program, moving appropriate candidates into treatment, housing, and job training. Life trajectories changed. The program not only obviated the need for a bigger jail, it freed up space in the existing one.

The county jail, as of late October, had about 3,700 detainees, compared with the 4,700 Wolff said were behind bars when he took office in 2001. That’s a 21 percent drop — even with the county’s population growth of more than 480,000 people over the same period.

“I think we can accomplish two goals,” said Bexar County District Attorney Nico LaHood, whose drug arrest as a 21-year-old informs his belief in redemption. “Getting it right — doing what’s right for each person — and being fiscally responsible.”

Erich Schlegel for The Boston Globe Brian Clark, the assistant medical director of San Antonio’s Restoration Center, a 24-hour facility for psychiatric and substance abuse crises, checks on sleeping patients in the detox unit.

Without treatment, the mania takes over. She loses control. She curses people out.

“It’s maddening,” said the woman, who had recently suffered from a debilitating spell of her severe bipolar disorder.

“That’s our goal together — to avoid those, right?” Judge Oscar Kazen told her. “You know we’re here to help, but we’re also here to watch.”

The woman, a former educator whom the Globe agreed not to identify, was sitting, mid-day on a Wednesday, at one end of a conference table inside a mental health clinic near downtown San Antonio. Kazen, an associate probate judge, sat at the other.

For almost 10 years until this summer, Kazen presided over Bexar County’s Involuntary Outpatient Commitment program, in which he issued civil orders mandating treatment for people with the most severe mental illnesses. To qualify, they had to have a history of hospitalization and resistance to help.

Such orders are allowable under Texas law and strongly supported by the local and state chapters of the National Alliance on Mental Illness — unlike in Massachusetts, where many advocates have long resisted mandatory care. Bexar is believed to have Texas’s most active program, more commonly known as assisted outpatient treatment.

Kazen typically supervised 60 to 80 participants at a time. He and a team of specialists, including case managers, a nurse, and a public defender, gathered weekly to check on their progress. The goal was to stabilize people and keep them out of state mental hospitals, emergency rooms, and jail. When they were ready, they graduated from Kazen’s mandatory treatment order — an occasion sometimes marked with a certificate and a cupcake.

Most of the time, the so-called black-robe effect — the cajoling power of a judge’s words — is enough to persuade people to follow their treatment regimen. (Those who refuse are monitored especially closely by authorities.) The program cut by more than two-thirds the number of days participants spent in hospitals.

Kazen said he understands objections to mandated treatment, but that letting people fail is not honoring their civil rights.

“That seems ludicrous to me,” he said. “I get that you want to preserve civil liberties. But I don’t get why you can’t have the discussion about where that line is.”

In July, Kazen was fired in a political shake-up. While the mental health work is expected to continue under new leadership, the outlook remains murky because of a simmering dispute over money and power between Bexar County leaders and local probate judges.

Other judges in the county have devised their own novel but voluntary mental health programs. Laura Parker, a juvenile court judge, created an intervention program for teenage girls with mental health challenges who had committed mostly minor offenses. In the past, they would cycle in and out of the justice system. Now, for girls who take part, Parker oversees their treatment, works closely with their families, and even personally arranges psychiatric appointments. It’s proven so successful that Parker and another judge launched a companion program this year for teenage boys.

That same ethos — get people to choose help, support them when they do — animates the entire Bexar County behavioral health care system.

Take the Restoration Center, a big, boxy building on the edge of downtown. It’s a point of entry for people in psychiatric or substance abuse crises, mostly for those who lack health insurance. In the past, they went straight to emergency rooms or jail. Now many come through here — some 2,400 people a month.

Open 24 hours a day, seven days a week, the center has a locked psychiatric ward for short-term stays, detox units, a medical clinic, and other services. Some patients walk in on their own. Others are brought by police or referred by hospitals. Anyone reporting suicidal or homicidal thoughts is seen within 15 minutes, day or night.

Erich Schlegel for The Boston Globe Clark checks the vital signs of an intoxicated man brought into the Restoration Center by San Antonio police.

“Our first answer is, ‘Yes,’ ” said Brian Clark, a fast-talking Navy veteran and physician’s assistant who helps run the Restoration Center.

In Massachusetts, there is no equivalent. Here, hospital emergency rooms function as crisis centers, and often ineffectively: Many people with severe mental illness end up being discharged without any promise of meaningful treatment. Massachusetts lawmakers this year rejected two budget amendments pushed by mental health advocates, including one requesting $210,000 to develop a crisis center and jail diversion program in Middlesex County modeled after Bexar County.

San Antonio’s Restoration Center is designed to stabilize people and funnel them into treatment, whether that’s an intensive, on-site substance abuse program, a longer stay in a psychiatric unit, or an outpatient plan with medication and counseling.

For some, the next step is right across the street, at a $101 million campus for the homeless called Haven for Hope. Haven opened in 2010 thanks to local energy magnate and philanthropist Bill Greehey, who has reportedly put more than $23 million of his own money toward the project and raised tens of millions more from benefactors. Six years on, more than 2,000 people come to Haven each month in search of assistance.

Some seek a short-term stay in a secure outdoor courtyard; others can remain longer once they assent to help, which often means treatment for mental illness, drugs, alcohol, or some combination. About three dozen social service agencies occupy a converted warehouse. Haven also relies on peer specialists — people in recovery to help those just starting on the path.

“You recognize, I have some skills that most people don’t have,” said Samuel Lott, a 53-year-old peer specialist and recovery coach who has bipolar disorder and a history of drug abuse.

Erich Schlegel for The Boston Globe A former drug addict who used to be homeless himself, Sam Lott (right) now helps others at Haven for Hope, a 22-acre homeless campus and treatment facility in San Antonio.

Haven offers a host of services, including dental and vision clinics, men’s, women’s, and family housing, Zumba classes, and storytelling and meditation programs.

“It’s grown into a little community,” said Scott Ackerson, a social worker and Haven for Hope vice president. But, he said, “This is really a launching pad. The goal is not to stay here.”

Since 2010, Haven has graduated more than 3,000 people into permanent housing, 90 percent of whom have not returned to homelessness after one year, the organization says. More than 1,900 people have found employment. Treatment and support programs continue as necessary even after they leave.

Haven officials make a concerted effort to get important details right. Everyone staying on campus long-term gets a “smart badge” to access meals, the gym, and other services, including mental health appointments. Staff can track who shows up and who doesn’t. If you miss a couple sessions, someone’s likely to come find out why.

Haven wasn’t born entirely out of altruism. Civic leaders had tired of their downtown — notably its crown jewel, the tourist-heavy River Walk — being marred by aggressive panhandling and public urination. With Haven, homeless men and women not only have a place to go day and night, but help ending their destructive cycles. In the first five years of Haven’s existence, the downtown homeless population dropped by 80 percent, an annual count showed.

Erich Schlegel for The Boston Globe Haven for Hope features a secure courtyard for the homeless to sleep, even if they’re not ready to engage in treatment.

One remarkable feature of San Antonio’s system is the way people and institutions have stepped in when gaps in care emerged. Four years ago, the University of Texas Health Science Center at San Antonio, in partnership with a local hospital system, developed a clinic for people discharged from hospitals and facing months-long waits for follow-up outpatient psychiatric care.

The clinic, which has since served more than 4,000 people, provides patients psychiatric prescriptions, home visits, and other services. Using a Web-based appointment system, staff at area hospitals can connect discharged patients to the clinic without so much as a phone call.

“These people are getting out of the hospitals so ill they can’t take medications,” said Dawn Velligan, a psychologist and professor at the university who helps run the clinic. “They don’t understand what they’re supposed to do.”

The reach of San Antonio’s mental health system extends beyond its gleaming medical facilities, down into the homeless encampments tucked under highway overpasses. Asten Bohanan, a 33-year-old Army veteran and former heroin addict, knows them well.

Diagnosed with mania and depression, Bohanan sought help from the Center for Health Care Services in 2004. But she was ambivalent about treatment. Her case manager — the agency currently has 360 of them — had to chase her onto the bus that Bohanan took to her job at a Pizza Hut call center, even transferring to a second bus when Bohanan did.

“That’s where my appointments happened,” she said.

When Bohanan relapsed a few years later, she remembered her case manager’s dedication. It drove her back to treatment and, ultimately, into a peer support job with the Center for Health Care Services.

Now she helps people just like her. When she needs to hunt people down, she knows just where to look — and what to say.

“Let me show you my track marks,” her message goes. “And you can see how I’m not going to judge you.”

Erich Schlegel for The Boston Globe Asten Bohanan (left), an Army veteran diagnosed with mania and depression, talks with Humberto Moreno, 26, one of the former addicts she works with as a peer support specialist.

In May of 2005, Ernie Stevens’s partner on the San Antonio Police Department signed them both up for Crisis Intervention Team, or CIT, training, a program pioneered in Memphis that teaches law enforcement how to recognize and deescalate mental health emergencies.

“Right away I was turned off,” said Stevens, who had been on the force 10 years. “I was like, ‘Bro, that’s not my thing.’ ”

But Stevens trudged to class, listening as Jeannine Owens, a local tour guide, talked about her adult son, who suffered from paranoid schizophrenia, and how much his illness ruled her life. Owens told the officers that she would understand if they had to shoot her son one day if that’s what it took for them to return safely to their families.

“I thought, how can a mother stand up in front of a group of strangers and say that’s OK?” Stevens said.

Stevens and his partner became evangelists for mental health training and for creating a specialized unit to respond to crisis calls. A burst of police encounters with mentally disturbed people in 2006, including the fatal police shooting of Michael Pais, a 30-year-old with paranoid schizophrenia, underscored how frequently police confronted mental illness in their day-to-day jobs.

Ten years later, more than 1,700 of the roughly 2,260 sworn officers in the San Antonio Police Department have received the full 40-hour Crisis Intervention Team training, which is now mandatory for all recruits coming through the police academy. Many local EMTs, firefighters, dispatchers, school administrators, and school police officers have also received training.

By contrast, Massachusetts has in recent years increased the number of hours spent on mental health training at police academies from four to 12. But fewer than 20 percent of Massachusetts police forces have enrolled officers in the kind of intensive CIT program that San Antonio has committed to.

The Bexar County sheriff’s office, which co-sponsors the CIT program, has trained nearly 90 percent of its roughly 1,430 sworn officers under Sheriff Susan Pamerleau — including deputies who work the streets and detention officers at the jail. The sheriff’s office has long had its own mental health unit, which responds to crisis calls, delivers warrants, and transports patients to state mental hospitals (which Texas never closed, unlike Massachusetts, which dismantled almost all its old asylums). From 2003 to 2009, the unit was using force in its daily work more than 50 times a year. Since 2009, when all its deputies were trained in crisis intervention, the unit, as of October, had used force just seven times total.

“If that’s not data that shows the value of crisis intervention training, I don’t know what is,” Pamerleau said.

Erich Schlegel for The Boston Globe James Williams (left) and Jon Sabo, partners in the San Antonio Police Department’s mental health unit, prepare for an evening shift by checking dispatch calls on the computer in their SUV.

While CIT training is designed to give every patrol officer fluency in mental illness, the police department’s mental health unit, launched in 2008, lives it every day. The unit is still small — three two-officer teams, with no coverage on weekends — but the department is looking at adding another four officers.

Mental health unit officers operate differently than other cops. They choose which calls they respond to; each case can take hours. They dress in street clothes, conceal their weapons, and drive unmarked cars. They avoid using a command presence or voice, trying instead to stay nonthreatening.

James Williams, 33, and Jon Sabo, 52, who work the night shift together, keep cigarettes and lighters in the car, handing them out as a gesture of trust in difficult situations. They freely give out cards with their cellphone numbers. The unit is a frequent resource for colleagues on the force and people across the city.

“I tell everyone, ‘This is the future of policing,’ ” said Joe Smarro, Ernie Stevens’s partner.

One Friday afternoon, Stevens and Smarro responded to a call from a mental health clinic. A woman in her late 30s with schizophrenia had stopped taking her medicine and reported that she might hurt herself or someone else.

Stevens and Smarro entered a small exam room, where the woman, wearing a bright orange dress, sat next to her mother, who seemed exasperated. Stevens crouched on a doctor’s stool, rolled close, and got personal.

“My daughter is on meds,” Stevens told the woman. “We had to change her meds three times before we found the right one.”

The woman replied that she stopped taking hers because it made her fat. Now she sees snakes on the floor and senses them inside her body.

“I can feel them right now,” she said. “They’re in my back — right here.”

“I want that feeling to go away,” Stevens said softly.

Erich Schlegel for The Boston Globe Ernie Stevens, an officer with the mental health unit, works with a mother and daughter to address the daughter’s symptoms of schizophrenia, including hallucinations that snakes are crawling through her body.

They discussed taking her to an emergency room, but Smarro said he wasn’t sure that was the best place. They talked through some options before settling on a psychiatric hospital that the woman knew.

Back in their SUV, Stevens and Smarro looked up the woman’s name in the computer. She had a prior misdemeanor warrant for failing to identify herself to police. But that could wait.

“Treatment first,” Smarro said.

As with Williams and Sabo, the close relationship between Stevens, 45, and Smarro, 35, helps them deal with any difficulties they encounter, like the time they helped a mother get the body of her 16-year-old son down from a closet where he’d hung himself. They act as one another’s counselor. They carpool. They play golf and go to church together.

Stevens takes the lead on cases involving child abuse, because Smarro struggles with those. Smarro, who spent four years with the Marines and saw combat in Iraq during the 2003 invasion, is skilled at dealing with military veterans, more than 100,000 of whom live in San Antonio. Smarro battled post-traumatic stress disorder himself and considered suicide in the past.

When he first joined the mental health unit, in 2010, Smarro felt he’d made a terrible mistake. He couldn’t let go of the cases. He had nightmares. But after years on the mental health beat, Stevens and Smarro have learned how to strike a balance, how to build trust with people without getting too close, how to embrace the mission without being consumed by it.

For all San Antonio has done to build a responsive mental health care system, the city has known failure and tragedy, too.

Perhaps the most horrific came in July 2009, when Otty Sanchez, a 33-year-old woman who had recently been institutionalized with paranoid schizophrenia, slipped through the system’s cracks and fatally mutilated her almost 1-month-old son in a fit of postpartum psychosis.

Sanchez had received free outpatient care at a Center for Health Care Services clinic the year before, but the center, its budget strained, was forced to cut back. The agency said she had to pay for treatment or sign up for a government benefit. Instead, she stopped going. A week before the murder, Sanchez was released from a local hospital and given the name of an outpatient clinic. She never went.

Nicole Fruge/San Antonio Express-News via AP Mourners comfort each other during a July 2009 vigil outside the San Antonio home where Otty Sanchez confessed to killing her baby son.

In 2014, a 24-year-old man suffering from mental illness shot and killed a local police chief southeast of the city while being served a graffiti warrant. In a span of three months in 2015, Bexar County sheriff’s deputies fatally shot two men showing signs of mental illness, including one, 41-year-old Gilbert Flores, who talked of “suicide by cop” but was seen on video with his hands in the air. This past summer, four detainees at the Bexar County jail committed suicide within a period of four weeks.

“No matter how good we do, it’s not if but when something horrid’s going to happen,” Leon Evans said. “There’s the human element.”

“But you can mitigate greatly people being criminalized, people being ill, and bad things happening in society,” he said.

Much of that work falls to Evans and his agency, which he’s built into a community pillar. The Center for Health Care Services, which also provides services to people with intellectual disabilities and early childhood education, has 1,000 employees and does 800,000 client encounters a year.

One of Evans’s gifts is chasing down money in a state that severely underfunds mental health; Texas as of 2013 spent less money per-capita on mental health care than nearly every state, far less than Massachusetts, according to the Kaiser Family Foundation. The center draws funding from more than 100 sources, including the state and federal governments, philanthropic groups, and private industry.

Evans has made a “silk purse out of a sow’s ear,” said Liza Jensen, executive director of the San Antonio chapter of the National Alliance on Mental Illness. But with some 40,000 people in San Antonio suffering from serious mental illness, she said, it’s not nearly enough.

Jensen points to several problems familiar in Massachusetts, including long waits to see a psychiatrist, too few options for outpatient treatment, and psychiatric patients boarding in emergency rooms.

Sally Taylor, chief of behavioral medicine for University Health System, which operates Bexar County’s public hospital, said access to care remains a scramble. Diversion programs are only as good as the services that follow, she said.

“We’ve come a long way,” she said. “But there’s just not enough capacity to treat people.”

“We feel responsible. We want to do more,” Evans said. “We would do more if we had the funding.”

What progress San Antonio has achieved continues to draw wide recognition. Des Moines, Los Angeles, Las Vegas, and Kansas City, Kan., to name four cities, have all been working to follow San Antonio’s lead. Los Angeles County has studied San Antonio’s diversion and crisis center initiatives. Des Moines and Kansas City have built CIT programs and paired mental health clinicians with police units, opened crisis centers, and diverted low-level offenders from jail.

The biggest lesson from San Antonio, said Julie Solomon, who runs emergency services for the county mental health agency in Kansas City, is simply knowing what it’s possible to accomplish in 10 to 15 years.

“For us,” she said, “seeing what they’ve been able to build in that timeframe — from having nothing to where they are now, which is leaders in the nation — that was super helpful.”

Erich Schlegel for The Boston Globe Weekly yoga classes for female and male residents are one of many services and programs offered at San Antonio’s Haven for Hope to help people get their lives back on track.

There’s little doubt that the years of work community leaders in San Antonio have put in have moderated and prevented many mental health crises, averting violence, saving lives, and vastly improving prospects for scores of people afflicted by mental illness, along with their families.

“Any city, any police chief, any police department that’s paying attention — I think they will get on board,” said San Antonio Police Chief William McManus.

The success is all the more striking for a city with a poverty rate significantly higher than that of Texas and the country, and whose massive military population makes PTSD cases especially prevalent.

But the city and county aren’t sitting still. Mental health leaders are identifying mentally ill offenders at arraignments. They’re studying how to intervene in the 300 new cases of psychosis among adolescents and young adults that emerge every year. They’re building a “digital dashboard” for law enforcement, to provide instant access to a person’s psychiatric history and real-time information about available treatment beds. The objective is the same: treat early, stave off escalating dysfunction down the line.

Evans, who is 69, believes that the cooperative approach here has become so ingrained that it will survive coming retirements and changes in political leadership. A big moment arrives in April, when Evans himself plans to step down, to do some consulting and spend more time with his five grandchildren.

“I feel fairly confident that what we’ve done here will continue with or without me,” he said. “I feel really good about that.”

But Evans’s retirement will be a major test for the system, just as Oscar Kazen’s departure from the courtroom has been. Bexar County will also have a new sheriff. Susan Pamerleau lost her bid for reelection in November; so did Judge Laura Parker.

“Whatever you’ve set up has got to outlive the personality,” Kazen said. “It’s not about the personality. It’s about the mission.”

Evans said he’s struck by how many people feel ownership of all they’ve accomplished. Like police officer Joe Smarro, who likens the investment in mental health care to saving for retirement.

“You’re not going to get a great return up front,” Smarro said. “But you’re going to get a great return five, 10, 15 years later.”

When Evans advises other communities, one of his most important kernels of wisdom is also one of his simplest.

“It’s about who you get in the room,” he said. “And can they say ‘yes,’ instead of ‘no?’ ”