The Leadership Insiders network is an online community where the most thoughtful and influential people in business contribute answers to timely questions about careers and leadership. Today’s answer to the question, “How should you react after making a big mistake at work?” is written by Patrick Mullane, executive director of HBX, Harvard Business School’s digital education initiative.

Well, that hurt. Twenty years ago, I was standing in my commander’s office as he told me in muted tones that I had not handled something well. He was a leader I really looked up to, and knowing I had disappointed him made his delivery even more painful—I almost wished he would just yell.

About an hour earlier, during a tension-filled exercise, I had told his boss, in front of probably 50 others, to keep quiet while the team I managed tried to work out a problem in preparation for an intelligence satellite launch. I was a 26-year-old Air Force captain at the time. My boss was a 40-something colonel and his boss was a 50-something senior official from the CIA. Needless to say, the CIA manager was not happy with my calling him out during an exercise. And he let my boss know it.

The thing was, I was mostly right. The CIA official had broken with established protocol and my commander conceded this. But, he correctly pointed out, I wasn’t right in how I rebuffed the senior official publicly. I had made a big mistake, one that could be career-limiting. In that moment, I had visions of being drummed out of the military, with a dishonorable discharge for my indiscretion. What should I do?

I got lucky in that moment, and followed what I’ve since learned is the best path forward in such situations. First, I conceded that I had indeed screwed up. There’s no point in fighting when you mess up; doing so makes you look petty and insecure. That reaction will stick with your boss and those around you far longer than a discreet mistake will, even if it’s a big one.

Second, I asked what I could do to remedy the situation, offering first an apology to the senior CIA official. My commander said that wouldn’t be necessary—he would handle it—but he did say that I should acknowledge to those who worked with and for me that I had messed up. Offering to make amends immediately disarms those offended and helps rebuild valuable relationships. And making such acknowledgements to those who aren’t expecting them often has an even greater effect.

 

Third, I recounted in my own mind what had happened and replayed a scenario in which I had acted more appropriately. This helped me internalize a mental checklist, so that if a similar situation arose again, I would handle it better.

Finally, I found a way to reference my mistake in a self-deprecating manner in the weeks after. This is a delicate balance, since being too flippant can come off as arrogant. But making light of your own flaws can make you seem more human to those you interact with.

Unlike The Doors frontman Jim Morrison, who said, “Some of the worst mistakes in my life were haircuts,” you’ll likely have to deal with more substantial transgressions over your career. In these moments, your mistakes can feel deadly. But most of the time they’re not, and are more salvageable than you realize. Take a deep breath, and act deliberately and genuinely to make amends. You’ll live to fight another day.