Netflix chief communications officer Jonathan Friedland is leaving the company following a controversy over insensitive remarks.

In a memo to staffers Friday, Netflix CEO Reed Hastings described two incidents in which Friedland used a racial slur. He wrote of Friedland: “His descriptive use of the N-word on at least two occasions at work showed unacceptably low racial awareness and sensitivity, and is not in line with our values as a company.”

Friedland had previously announced his departure on Twitter earlier Friday, saying that he felt awful about “the distress this lapse caused.”

Friedland joined Netflix as VP for communications in 2011, and became the company’s chief communications officer a year later. His ascent at the company coincided with Netflix’s first major PR debacle, the proposed split of its DVD business into a separate company called Quickster — which Netflix quickly walked back on.

Before joining Netflix, Friedland had served in communications roles for Disney. He was a journalist by trade before crossing over to work in public relations, and worked for a decade for The Wall Street Journal, where he served as the paper’s Los Angeles bureau chief.

Friedland’s departure comes at a time of success for Netflix, which has been beating market expectations over the past quarters, and now has over 125 million subscribers worldwide. This week, Netflix’s stock price surpassed $400 a share for the first time in the company’s history. On Friday, Netflix’s stock closed at $411.09. It was down $4.35, or around 1 percent, in after-hours trading following the news of Friedland’s departure.

Hastings detailed the two incidents that led to Friedland's exit in the staff memo, which was obtained by Variety:

"The first incident was several months ago in a PR meeting about sensitive words. Several people afterwards told him how inappropriate and hurtful his use of the N-word was, and Jonathan apologized to those that had been in the meeting. We hoped this was an awful anomaly never to be repeated.

"Three months later he spoke to a meeting of our Black Employees @ Netflix group and did not bring it up, which was understood by many in the meeting to mean he didn’t care and didn’t accept accountability for his words.

"The second incident, which I only heard about this week, was a few days after the first incident; this time Jonathan said the N-word again to two of our black employees in HR who were trying to help him deal with the original offense. The second incident confirmed a deep lack of understanding, and convinced me to let Jonathan go now."

Hastings added that he regretted in hindsight not having "done more to use it as a learning moment for everyone at Netflix" after the first incident.