He was the first stranger to enter our house in 105 days. It was 4:13 a.m. on a Friday, and my husband, who works at night in an office in our backyard, was listening to music with headphones. He didn’t hear the stranger pass through the gate, walk up the back steps, and enter through the back door of our house.

I woke when the man switched on the bedroom light. For an instant, I was simply confused, befuddled by sleep. The stranger was standing by the side of my bed. His wide, protuberant eyes stared down at me, and there seemed to be something like a smile on his face. I asked the obvious questions. I can’t remember my exact words, but they were the questions of someone whose bewilderment was turning rapidly to terror. Who are you? What are you doing? The stranger told me he had permission to be in my room. You said it would be all right. He took a step closer to the bed. He slipped his hands under the covers, and I felt the shock of his fingers sliding up my leg.

That is when I started to scream, though the word scream doesn’t really convey the animal sound, deep and ragged, that ripped loose from my chest. For two weeks, my voice was hoarse, my throat raw. It hurt to speak.

The howl woke our two teenage children, my younger daughter and son, who ran down the hall. They confronted the stranger they found standing by their parents’ bed. They didn’t stop to think. My daughter grabbed him by his sweatshirt, jerked him out of the bedroom, and shoved him down the stairs. With her brother’s help, she pushed him out the door. I called 911.

In a strange coincidence, this was not the first 911 call I had made that week. The previous Monday morning, a man in his early 20s had knocked on our door, begging for help. He couldn’t remember his name, he said, or where he lived. He had a large bump on his head. His clothes were filthy, and there was a hole in the toe of one of his Vans, but he was dutifully wearing a mask. He said he didn’t know where he was going, or why he had decided to come to our house. The eyes above the mask looked wild and afraid.

That time, I did not, at first, call 911. I live in Berkeley, California, which, unlike many cities, maintains a crisis team for precisely this kind of mental-health emergency. The team’s hours are limited, however: 11:30 a.m. to 10 p.m., five days a week. When I called, no one picked up. I felt I had no choice but to call 911.

I told the dispatcher who answered that we had a stranger at our house who seemed to be in the midst of some kind of psychiatric crisis, perhaps caused by an evident head injury. He seemed vulnerable rather than dangerous, I said, and we needed an ambulance, not the police—and definitely not armed police. The dispatcher informed me that I did not have the right or authority to dictate what kind of action the situation demanded. I slammed the phone down.

By now the young man had drifted from the porch to the front yard, where my daughter and husband were trying by turns to reassure, placate, and find out what they could about him—to little effect. Every so often some clarity about his predicament seemed to overwhelm him, but he couldn’t put the source of his fear into words. He looked to be about the age of my eldest child—I could have been his mother. Keeping six feet away, speaking in the same kind of soothing tone I used to calm my kids when they were small, I invited him to sit down in an Adirondack chair and urged him to count his breaths.

At the same time, I tried to think of someone, anyone, who could help without the threat of force. Finally, I called 911 again, hoping for a more cooperative dispatcher. I used my best sensible, obliging lady voice, a pleading rather than demanding Karen, if you will. The second dispatcher promised that she would make it clear to the responder that the young man needed assistance, not violent intervention. My husband and I sat with him until the police arrived, and at one point he asked us to read to him. He greeted my husband’s recitation of Thomas Gray’s “Elegy Written in a Country Churchyard” with a request for a “happy poem.” Good luck with that. I was frantically Googling happy poem when the officer showed up.

Her response was initially gruff, but when the man panicked, and we asked her to be more gentle, she complied. Eventually EMTs arrived and transported this fragile young man to an ER. Afterward, my husband and I discussed the incident with our kids, in light of the recent push to defund the police. We noted that the officer in our affluent, mostly white Berkeley neighborhood had acquiesced when we insisted that she avoid a confrontation. Even when the young man became agitated—first when he saw her, and then when the ambulance pulled up—she respected our request that she not escalate the matter. No doubt, we told our children, her accommodating approach had a lot to do with the fact that both we and the stranger were white.

Days later, with an invader in my house, I did not set any preconditions when I called 911. Sobbing, shaking, I just shouted, “There’s a man in my house! There’s a man in my house!” Within minutes, multiple units responded to the call. One officer took my statement, another took my husband’s, and others fanned out across the area. Two more interviewed my children in different rooms, and they gave detailed, congruent descriptions of the intruder: skinny, jumpy, bug eyes, loose hoodie, shorts, beat-up sneakers, black backpack. Old enough to have lines on his face. His skin was brown, they said. Perhaps he was Filipino. The responding officer sent the description out over the radio, and a few minutes later got a call: Officers had detained a suspect. My children were loaded into separate squad cars and driven past the man whom the police had grabbed and cuffed.

He was a Black man, with nothing in common with the intruder but his backpack. My daughter was so infuriated that she started to cry. My son could not stop thinking about the way the man had looked back at him as the police car rolled by, not angry but resigned. Who knows how many times he’d been stopped by the cops over the past years, months, or even days.

Ten minutes later, the police picked up another guy. It was past five in the morning by now. Again they bundled my son and daughter, exhausted and wired, into separate cruisers and drove them past the suspect. It was the intruder; neither of them had any doubt. He was taken to jail and charged with two felonies.

I’ve been immersed in issues related to the proper role of law enforcement since early in my career, when I worked as a public defender, law professor, and drug-policy reformer, and served on the board of a prison-reform organization. I was also part of the team that created the recent Netflix show Unbelievable, which examined the police response to sexual assault. Taken together, my two encounters offer an (almost too) ideal platform to consider what law enforcement looks like now, and what a fundamental reimagining of it might consist of.

The case of the troubled young man is straightforward—a clear example of when weapon-wielding cops can easily do more harm than good. The NYU law professor Barry Friedman, among others, argues that police functions should be “disaggregated”: Mental-health professionals should respond to incidents involving people like the young man; substance-abuse counselors should deal with drug-related crises; experienced mediators should address situations that require conflict resolution; and so on.

As for the second guy, the best-case scenario is more complicated. A few weeks after this invasion, Donald Trump posted a campaign ad showing a phone ringing in an empty office. An answering machine clicks on and a female voice ominously intones, “Due to defunding of the police department, we’re sorry, but no one is here to take your call. If you’re calling to report a rape, please press 1. To report a murder, press 2 ...” The last image is Joe Biden’s face, superimposed over a city on fire, with the words “You won’t be safe in Joe Biden’s America.” Crude and misleading as the ad is (for one thing, Biden does not support defunding the police), it plays on a frequently expressed fear, one perhaps particularly common among white women: What about sex crimes? If we dramatically downsize the police, who will deal with the violence against women endemic in our culture?

Mariame Kaba, an anti-criminalization organizer, wants us to shift our focus. No matter the system, she told me, there will always be violence. The question Kaba believes we need to ask is why law enforcement, an institution that nominally exists to keep us safe, so often does the opposite. For years, decades, centuries, Black people have wrestled with whether to bring in the authorities for serious and not-so-serious crimes, and often rejected the option as too dangerous—for themselves, for the perpetrator, or for others in their community.

Many people who’ve been sexually assaulted have experiences like Unbelievable’s Marie, who was raped and then victimized again and again by misogynist, incompetent cops who refused to believe her story. In fact, she was one of the early victims of a serial rapist who went on to attack at least half a dozen other women. More generally, the police are remarkably ineffective at catching the perpetrators of violence, especially sex offenders. According to RAINN (the Rape, Abuse & Incest National Network), an arrest is made in only 20 percent of reported sexual assaults, and only 10 percent of those arrested end up serving time.

Friedman, who heads NYU’s Policing Project, argues that investigating crimes is not a natural function for police, at least not as they’re currently recruited and trained. “Recent breakthroughs in forensic science suggest we need way less police and much more dispassionate evidence collection and evaluation to get things right,” he has written. Investigators need scientific expertise, as well as sophisticated interviewing skills characterized by “a certain combination of skepticism and emotional intelligence”: the ability to make people feel comfortable opening up while simultaneously probing to make sure their stories hang together. Even the pursuit and apprehension of offenders would be better served by a rightsized public-safety response team, it seems, a corps perhaps screened for racist bias and trained in de-escalation and the avoidance of force.

Dialing 911 was the first decision I had to make after I discovered the man by my bed—if you can describe my frantic call as a “decision.” The second came a day later, when a police investigator contacted me to ask whether I wanted to prosecute. In the throes of a trauma that I was busy underestimating (“I’m fine. I’m fine. Really, I’m fine”), I tried to balance a host of considerations. For starters, would my children and I be willing to testify if he went to trial? I’ve seen what a competent defense attorney can do to a witness. I was a competent defense attorney, setting traps for people, tying them up in their own words, doing my best to trigger confusion and even fear. Could my kids and I stand up to that? Would rekindling the trauma be worth it?

Knowing that the majority of criminal cases end in a plea bargain, no court required, somewhat alleviated my anxieties, but it didn’t make the decision appreciably easier. How could I consign someone to the brutalities of incarceration when I’ve long advocated for the abolition of prisons? I even edited a book called Inside This Place, Not of It: Narratives From Women’s Prisons, a collection of first-person stories designed to illuminate the countless human-rights violations that plague prisons in the United States.

Granted, my family and I would feel safer while the man was confined. Since he stole into my bedroom, I’ve been startling awake multiple times a night, terrified. Before we go to bed, I repeatedly ask my husband if he’s locked the doors and turned on the alarm. For weeks, my son saw the man out of the corner of his eye in dark rooms, and he took to sleeping with a hammer beside his pillow.

But what about when my attacker got out—was there a chance he’d be less of a threat, to me or someone else? According to the investigating detective, his record includes at least one psychiatric hold, suggesting that his violent behavior might stem in part from some form of mental illness. He definitely seemed unbalanced when he leeringly insisted that he’d been invited into my house, that everything was fine. Though a significant number of people in American prisons are mentally ill, very few receive any kind of psychological care. The harsh conditions of confinement could just as easily make him less stable rather than more. Some prisons have programs targeted specifically at rehabilitating sex offenders, but their effectiveness has been the subject of much debate over the years.

It doesn’t have to be this way. Though hardly perfect, Scandinavian penal systems, for example, are premised on rehabilitation. They provide treatment and therapy, with the goal of releasing better citizens into the world. In America, we focus on punishment, in the misguided belief that it will deter offenders. In fact, the severity of punishment does little to deter crime. What deters criminals is the certainty of being apprehended, but as I’ve said, this is not a certainty the American justice system even begins to provide.

The upshot is that if I prosecuted, I would be participating in a deeply unjust system, one that I’ve worked years to get rid of. Yet if I failed to do so, the guy who came into my bedroom might hurt someone else. Had Unbelievable’s Marie been taken at her word, at least half a dozen other women might not have been raped. I went forward.

There was one last bad choice I had to make. The deputy district attorney called to ask me what kind of plea I would be willing to accept. Was I adamant that the guy plead guilty to the sexual offense: breaking and entering for the purpose of committing a sexual crime? Or would I approve of a plea to burglary alone? The latter carries a sentence of up to four years, with the expectation that the perpetrator will serve half of the time; the former requires 15 years to life. “California law,” the deputy DA told me, “does not like burglary for the purpose of sexual assault.”

Two to four years behind bars. Fifteen years to life. Again, how can I weigh my fear for myself and others against the fact that prisons are dehumanizing, virtually useless for rehabilitation, and usually spit out people who are in far worse shape than when they went in? Over the years, I’d heard that 60 to 80 percent of sexual-assault perpetrators commit additional sex crimes, but when I looked at the data, I discovered that this is a wild exaggeration, a kind of urban myth. The best estimates peg recidivism at 5 percent three years after an offense, and at 24 percent 15 years out. But still. Those numbers aren’t nothing, and they come with the caveat that many sex crimes go unreported, so who knows what the true picture really is?

I tried to think of an alternative path available to me, a “third way” that envisioned a transformed criminal-justice system, better for all. But I couldn’t come up with anything. As Mariame Kaba points out, this wretched system has “disciplined our imaginations.”

So I split the difference. Let him plead to the burglary, I told the assistant DA. (At the time of publication, he hadn’t yet responded to the prosecutor’s plea offer.) This way, not only will his sentence be much shorter, but when he gets out, he won’t have to be listed on a sex-offender registry. Registries are notoriously worthless for preventing future sex crimes and, because of strict limits on where people can live and work and with whom they can associate, virtually guarantee that former prisoners aren’t able to create better lives for themselves.

The night after the break-in, I made my husband switch sides of the bed with me. After 28 years, I now sleep on “his” side, the one farther from the door. In this case, that’s as close to a transformation as any of us is likely to get.