Anderson’s Green Sun (Mulholland, Feb.) is set in the early 1980s, and the novel’s cop hero, Hanson, works the night shift patrolling the streets of East Oakland, Calif., alone in his squad car.

What was the inspiration for Green Sun?

In 2012 I was invited to France to promote a book that had just been published over there. After I got back, all the police shootings were in the news. I began to write Green Sun trying to remember who I had been as a cop in Oakland in 1983. Was I like those cops doing the shooting? How did I think? What did I do? What was it like?

As a police officer, Hanson describes himself as an “armed social worker.” Can you explain a bit?

That’s what a cop’s job is, or should be—to keep the peace, broker justice, effect compromise, listen to sad stories, mediate conflict, and, finally, when necessary, enforce the penal code. He has to be armed, though, to stay alive.

Hanson manages to defuse situations by responding fearlessly, yet always humanely. It’s a stance that often puts him at odd with his peers.

We have huge problems in this country, with race, income inequality—as it’s referred to—and the way our laws are written and enforced, especially drug laws. Besides honest dialogue about these problems, we need good cops, who are not just dogs on chains, to mediate, and report on problems, and suggest ways they might be remedied. They need to be honest and articulate and brave. We have cops out there like that, but it’s a lonely world for them, at odds with the citizens they are supposed to serve, the laws they are sworn to enforce, and the departments they work for. Too many of the good ones resign—disappointed, heartbroken, and angry—and I hope that Green Sun shows how and why that happens.

If there was one thing you’d like readers to take away from reading Green Sun, what would it be?

A better understanding of how difficult it is—morally, emotionally, and intellectually—for someone to be a cop and still to feel like he or she is a good and decent person, and to be seen as such in the eyes of noncops. Who in the world would want to be a cop these days, knowing that they are seen as stupid and brutal and racist, whenever they wear their uniform? Non-cops have absolutely no idea what it’s like to be a cop, except through narratives they see in movies and on TV.