When police kill civilians — even obvious bad guys — the public understandably calls for investigations into what happened. Are officers acting in self-defense, or did they escalate a situation because of poor training or other factors? Figuring out what should have happened is essential to improve the trust between police officers and the people they serve.

But determining what went wrong isn’t all that matters. It’s important to look at tense standoffs between officers and individuals that are resolved peacefully. Then, we can determine what went right. That examination should include more than the confrontation — look at the training the officers received and compare it to that given to officers who act more aggressively in comparable situations. The conflict is merely the end result.

Last week, the New Mexico State Police faced off against a 47-year-old man in Velarde. He had threatened to kill his ex-girlfriend and had barricaded himself inside a home with a rifle. The man was armed and dangerous. Yet after an hours-long standoff, the man was taken into custody without shots being fired. He will face numerous charges, as he should, but he did not lose his life that night. Nor were officers hurt.

Looking at what happened, it is clear that State Police officers exercised patience, restraint and did not escalate the conflict — even at points when such tactics might have felt warranted.

First came a 911 call around 4:30 p.m. on a Saturday, prompting officers to gather around the Velarde home, where the man was holed up. A third party called police to tell them that the 47-year-old had texted his ex-girlfriend that he planned to kill her. He also sent a video that showed he already was inside the house. Because that’s not his home, police knew he likely had broken in.

A key to the response was information — both where the man was, that he was armed, and additional reports that he likely was drunk. Police arrived, found open windows and crawled in, calling for the man to surrender. Here’s where the meeting could have turned tragic, but did not.

When the man refused to turn himself over to police — he was in a bedroom — officers did not charge in, shooting up the place. They left the house. They had spotted the suspect holding a long rifle, and exited before he could shoot. It helped that the ex-girlfriend was not home at the time, of course. That meant officers did not have to worry about a potential hostage situation.

After setting up a perimeter around the house, police waited. More help came in at 6:30 p.m., arriving at 7 p.m. The man surrendered after 6 1/2 hours and was arrested after 11 p.m.

That’s how it’s supposed to work.