No one told me how fiercely handguns could kick. But when I pulled the trigger of the .40-caliber Glock, it sent me reeling back toward the concrete floor. I might have cracked my skull if an extra-large policeman had not caught me just in time. The kick was my first shock that afternoon at the rifle range.

As a congenital pacifist, I was the last person anyone would expect to find there, but I was doing research. I’d written novels about a golden retriever and a yellow Lab, and I’d been looking for a story line for my next book—a novel about Justice, a K-9 German shepherd. What better way to learn about police dogs than to sign up with 19 other people for the police department’s Citizens Academy in Bainbridge Island, Wash., where I live?

For 10 weeks we attended classes and learned about narcotics, traffic tickets, and crime scenes. We visited the county jail and morgue. The Saturday when I fired the Glock was a workshop to teach hands-on tactics for police work. Armed with a laser gun that projected two red-dot lights, each of us donned a bulletproof vest and, one by one, left the range’s clubhouse and pretended to be an on-duty officer.

That led to my second shock. Another policeman, his face stern as stone, pointed to a shed in a wooded area up the hill from the rifle range and told me, “An intruder just broke into that ‘house.’ The owner called for help. Go take care of it.” My hand tight around the laser gun, I started the lonely walk up the hill.

Though still shaken from the Glock’s kick, I felt confident at first. Still, the closer I got to the shed, the more wary I felt. No one was in sight to back me up in this isolated place. Who knew what intruder I’d meet? I reminded myself, “You’re role-playing!” Yet, rational or not, fear nibbled my stomach.

I planned first to walk around the house and look into windows; if the intruder were hiding, I’d marshal my grit and go inside. Just as I started my search, however, a man burst out from behind the house and ran at me, brandishing a handgun. I heard him scream, “I’m going to kill you! I’m going to kill you!”

I froze. My heart pounded. As the man lumbered toward me, he seemed to grow eight feet tall before my eyes, and his handgun looked like an Uzi. I had no choice. I wanted to live. With trembling hands, I shot him—two lethal blood-red laser dots straight to his heart. I, who shooed flies out the window instead of swatting them, had “killed” someone.

You might think that the man was my last shock for the day. He wasn’t. Later, my class learned that every single one of us had shot him to defend ourselves. I thought, “Well, of course, we did. We didn’t want to die.”

Then came the biggest shock of all: the man who’d run toward us had been the homeowner. He’d not yelled, “I’m going to kill you,” but, “Thank God you’re here!” The enormous gun we’d all been sure would shoot us had only been a flashlight. When you’re afraid, adrenaline blurs reality, you see with tunnel vision, and your only thought is to survive.

If we’d been real police who’d used deadly force, every one of us would face a criminal homicide investigation. Isolated on administrative leave, we’d wait to learn if our shot would be ruled justified. We might be shunned in our community and vilified in the press. Our one-second decision to shoot could cause us months of soul-searching, guilt, legal agony—and possibly jail time.

That Saturday of shocks gave me a crash course in empathy. Though I’d be the last to defend a trigger-happy cop, I understood that a well-meaning one could make a mistake, as I had. And that insight provided the story for my new novel, A Healing Justice, about a female police officer who uses force and is sustained through the ensuing crisis by her K-9 partner named Justice. After that day, I saw the risks of the job, and I understood fear and a desperate urge to live, as my officer does.

Kristin von Kreisler’s new novel, A Healing Justice, was published in September by Kensington.