“I waited too long to act,” the CEO of a contractor told me (identities are disguised in this post). “I appointed to a senior position a man who had been a longstanding mentor and friend—because I respected and trusted him. He turned out to be a great engineer but an inadequate manager. I knew that I had to let him go, but faced the conclusion most reluctantly. I should have acted sooner.” CEOs around the world confirm what he said: to fire a friend is one of the hardest tests of leadership, an experience fraught with anger over poor performance, disappointment, delay fueled by rationalizations of all kinds, guilt, and grief over personal loss. It is often remembered as one of the pivotal events in the development of a leader because it crystallizes the question: for whom or what do you lead?

To the uninitiated, firing someone seems fairly straightforward. You are unhappy with the employee’s performance. You say so. And then you say that the employee is separated from the firm. If you are Donald Trump, you can add a scowl and a rising voice, “You’re fired! ” Or you can hire someone like George Clooney, who played a consultant in the movie, Up in the Air–he specialized in terminating employees whom the managers didn’t want to face. This looks easy. Needless to say, this view of terminations assumes the emotional courage of a robot.

The CEO learned otherwise. What makes firing a friend such a trial is the emotional dissonance: the affection and loyalty you feel for the friend clashing with your obligations as a leader. A friendship is created through long investment, a sharing of joys, anxieties, defeats, aspirations, and successes. Aristotle said that friendship is a single soul dwelling in two bodies. To cut off a true friend is to wound your soul. The CEO struggled at length with his conflict. As he watched his friend flounder, he listened to the growing murmurings of other senior leaders and members of the corporate board.

The CEO found that in a situation like this, it is impossible to ignore your obligation as a leader. Your job is to sustain and strengthen the enterprise. To harbor an underperformer who is a friend is cronyism. The signal this sends to the rest of the organization is deadly. The highest-performing employees (who have the best career alternatives) will be more likely to quit upon evidence that relationships, not merit, drive staffing decisions. Your other managers will be more likely to harbor their underperforming friends. Slackness will spread like cancer. All eyes are on you; you must act.

One of the most famous examples in world literature appears in Shakespeare’s play, Henry V. The new King Henry had been elevated to the throne of England upon the sudden death of his father. Henry had been a playboy, drinking and carousing all over London. But the responsibilities of leadership, a thwarted assassination attempt, and war with France sobered him completely. When a member of his army, one of his old drinking friends, looted a church in France, Henry faced the dilemma: forgive and save his friend, or serve justice and strengthen the discipline in his army? Henry chose to hang his friend from a tree visible to his troops.

The stories of Henry V and the CEO pose the question, for whom or what do you lead? Great executives lead on behalf of values such as pleasing the customer with top quality products and superior service, giving back to the community, respecting the environment, nurturing and developing employees, and rewarding investors for the use of their capital. To deviate from your values is not leadership. You don’t lead simply to preserve friendships—that would be a conflict of interests between yourself and your obligations to your stakeholders. As a leader you must rise above the conflicts and serve the high values of the whole enterprise.

An ongoing challenge for CEOs is to prepare the rising generation of young leaders to confront decisively the pivotal ethical dilemmas, such as firing a friend. In our courses and research at the Darden School, we explicitly challenge students and managers with the question, “For whom or what do you lead?” Through case studies, games, simulations, and team projects, students and managers wrestle repeatedly with ethical dilemmas and ultimately, with corporate and personal purpose. We have found that deciding ethically can be taught.

Years after the event, the CEO of the contractor believed that firing his friend was the right course. He said that at the end of it all, getting fired might be the best thing for your friend. Perhaps the handwriting has been on the wall and the friend hasn’t had the courage to act. The friend might actually feel relief and chart a new and more effective career path. Who knows: months or years later, the friend might actually thank you.