Deputy Robert Aviles, armed with a clipboard and brightly colored paperwork, approaches the porch where a straw welcome mat bears the black-lettered inscription, “Don’t even think about it.” His partner, Kevlar-clad Deputy Paul Woehl, hangs back several feet as Aviles raps on the white door to deliver the bad news.

“Sheriff’s Office,” he announces.

A disheveled middle-aged woman answers and, after a brief exchange, beckons the officers inside. They follow her to the musty hallway, where another tenant appears from the back. The floors are strewn with clutter—hypodermic needles, heaps of junk mail, rumpled-up blankets. Translucent orange pill bottles sit atop end tables and an old player piano. Christian religious art adorns the walls.

“As of right now, as you know, the eviction is scheduled for the 25th,” Aviles breaks it to them. “That’s probably going to be the for-sure day. So make sure you stay in touch with your social workers. Has anyone moved out?”

Another tenant chimes in, telling deputies that they expect to move into a new place called “the purple house.” Aviles nods and takes notes.

“I need you to stay in touch with your social workers,” he repeats, trying to calmly convey the urgency of the predicament. “Can you do that? Because you have until the 25th, remember, and that probably won’t get extended again. OK?”

“Oh” the housemate replies, “is that right?”

“Yeah, that’s usually that’s the max number of days that they give,” Aviles says.

“What do you mean to say?” she asks, anxiety creeping up in her voice as she wrings her hands. “It won’t be extended anymore?”

“It probably will not be extended,” Aviles tells her apologetically. “Do you have any questions for me?”

“How about if we don’t have a place to go?” she wonders. “Where will we go?”

“That’s what we’re working on,” Aviles reassures her. “I don’t know all the alternatives, so I have some people looking into that. They may come and talk to you also. But hopefully we’ll get something figured out.”

Aviles says he bought as much time as he could for the women left in the single-story flophouse, which the landlord subdivided to accommodate several mentally ill tenants. Serving the eviction as scheduled a month prior would almost certainly have left the some of the home’s occupants on the streets.

“Last time we were here, a few didn’t even know that the landlord wanted them out,” Aviles tells me as we walk away from the tan stucco home on a quiet street in San Jose’s East Side. “We put up the notice, but I think somebody tore it down. If we went through with business as usual that day, the landlord would have been there with the locksmith, forced them out and that would be it”

Not anymore. Not if he can help it.

Seven years serving eviction notices for the Santa Clara County Sheriff’s Office haven’t made it any easier for Aviles to tell someone they have to leave. Especially for the single parents, the children, the mentally ill and countless others who could have been helped at some earlier point in the series of events that pushed them to the brink. Knowing that too many evictions could have been prevented or at least alleviated inspired him to create what he calls the Displacement Mitigation Team.

“This is a way to catch people who are not able to advocate for themselves,” says, a 15-year Sheriff’s Office veteran who expects to get reassigned to patrol in 2017.

Aviles began to assemble the task force earlier this year and formally deployed it for the first time in September. The idea stems from a counterpart in San Francisco, where deputies enforcing evictions link vulnerable tenants to social services instead of casting them out on the streets. He pitched the idea to his boss at the time, Lt. William Middleton, and Sheriff Laurie Smith, who told him to run with it.

“The concept is simple,” says Middleton, who recently stepped down from leading the civil services unit. “But it really does go above and beyond.”

Under California law, only sheriff’s agencies can enforce civil procedures. That includes evictions, which begin in court as lawsuits called unlawful detainers. A judge weighs the evidence to determine whether a tenant has violated a contract with the landlord. If so, they issue a writ that a sheriff’s deputy is mandated to post within three days and enforce less than a week later.

“By the time we get there, the case has been adjudicated,” Aviles says. “What we have is a five-day window between the time we post it and the time we evict.”

That leeway between notice and enforcement could alter the course of a person’s life, he says. That’s when the displacement team gets to work. By taking advantage of that narrow timeframe, Aviles hopes to prevent situations like so many he encountered in the past. He recalls an assignment in 2010 when he had to evict a mentally ill woman who was the sole caretaker of her brain-damaged daughter. Evicting them—a week before Thanksgiving, no less—would have rendered the women homeless.

“We told the landlord we just couldn’t’ do it,” he says, adding that his sergeant at the time helped him push back. “No way we’re putting them on the street.”

Instead, he called the county’s Office of the Public Guardian and Adult Protective Services, which informed him that it would take weeks to relocate the two women through that route. While scrambling for a way to avoid eviction, he did some detective work and tried to piece together their story. It took an hour of coaxing before the mother would admit that it was her name on the paperwork, let alone open up to Aviles. By prying her for information, he found out that the mother, who suffered from paranoia, apparently forgot to renew an authorization to receive her daughter’s public assistance stipend. That, he presumes, is how she fell behind on rent.

“There were so many chances along the way to prevent this,” says Aviles, who went through crisis intervention training in 2010, which opened his eyes to the plight of the mentally ill. “Over the years, cases like that have been on the forefront of my mind. There should be a process that guarantees the best solution to these horrible situations.”

With Sheriff Smith’s blessing, Aviles went around meeting with various nonprofits, social service agencies and county officials to create a network.

“It was months of me literally walking through the doors and saying, ‘So I have this idea,’” he says. “There was a lot of beating my feet on the pavement and pitching this to various people who passed the word onto various other people.”

In the course of laying the groundwork for the displacement mitigation team, Aviles enlisted social workers and attorneys. He got United Way to sign on, prompting the nonprofit to extend its 2-1-1 social services help line and algorithmic needs assessment to the effort. He put together a punch list with instructions for clerks and deputies to identify people who need the extra help.

“At the county, we really want to support that kind of effort,” says Steve Preminger, a special assistant to County Executive Jeff Smith. “We need to protect people’s dignity, to make sure that they don’t decay.”

Middleton compared the approach to the way police agencies respond to human trafficking cases, where social workers and advocates agree to ride along.

“We’re simply extending that to the way we deal with evictions,” he says.

In a broader sense, the strategy reflects the changing nature of law enforcement. Decades of dismantling public psychiatric hospitals, supportive welfare programs and other institutions that once cared for people in need has turned the modern police officer into one of the few tax-funded agents of public wellness.

It’s a reality that all too often plays into disaster. More than half the people who die at the hands of police had some kind of disability, according to a 2016 report by the Ruderman Family Foundation. The study’s authors, historian David Perry and disability expert Lawrence Carter-Long, looked at incidents from 2013 to 2015. Their conclusion: that people with psychiatric disabilities are presumed dangerous in police interactions.

“Police have become the default responders to mental health calls,” the report found.

New York City police officer turned psychiatrist George Patterson says most of modern policing involves services related to social work. In his view, latter-day cops are trained as soldiers but deployed as caretakers.

“The demand for services in general has grown and shifted,” Preminger agrees. “It speaks to income inequality, job training, population growth and budget cutbacks. These are the issues we’re discussing at the county. We’re talking more and more about how to adapt to this changing role—not just for police, but for all of us in all our departments.”

This past month, the displacement mitigation team got its first call from a tenant. Normally, they come from landlords or family. The tenant, who was being ousted by an out-of-town investment group, saw the five-day eviction notice taped to the door and called Aviles, unleashing an uninterrupted stream-of-consciousness diatribe.

“The overriding theme was that the sheriff has no authority to evict because various senators and FBI personnel have protected her from foreclosure,” Aviles recounts.

Though clean and well furnished, the woman’s home was equipped with about two-dozen security cameras and at least three monitored alarm services. Sensing she needed extra support, Aviles asked the landlord for more time. Through traditional investigative methods, he tracked down her ex-husband, who passed his phone number to relatives in India. It took the mitigation team more complicated maneuvering through another ex-husband up in Seattle and a friend in Los Angeles, but the woman eventually reunited with her family abroad.

“She is now in India with her father and getting professional help,” Aviles reports. “I spent a lot of time trying to find somebody who knew about her. I talked to the neighbors, who really liked her and wanted to help. It’s actually a testament to what a good soul she is. It shows how mental illness creates this shell that gets thicker, and thicker, and thicker as you deteriorate, but inside there’s somebody that still loves.”

Of the 15,400 evictions processed in this county since 2006, only about 5 percent involve the kind of cases the mitigation team is designed to help. Aviles expects to deploy the above-and-beyond interventions about twice a week. Since launching the team this past fall, he says he’s helped six people avoid homelessness or traumatic displacement.

“There’s a whole universe of problems related to the housing crisis,” he says. “But here’s a specific chance, a way to target our efforts to prevent homelessness before it starts. And to protect people who may not be able to fend for themselves.”

By connecting with various agencies, the displacement team could also reverse engineer the crises that brought people to the point of eviction.

“There are all these points along the way where someone or something may have helped them,” Preminger says. “Now that we’re looking at it this way, we can start filling those gaps in service.”

Jennifer Wadsworth is the news editor for San Jose Inside and Metro Silicon Valley. Email tips to [email protected]. Follow her on Twitter at @jennwadsworth. Or, click here to sign up for text updates about what she’s working on.