Author Walter Mosley says he recently quit a television series on which he was writing after another writer complained about his use of the n-word in the writers’ room.

Mosley, who is African-American and Jewish, wrote in an op-ed for the New York Times that he had used the word while telling a story from his past. “I just told a story about a cop who explained to me, on the streets of Los Angeles, that he stopped all n—-rs in paddy neighborhoods and all paddies in n—-r neighborhoods, because they were usually up to no good,” he wrote. “I was telling a true story as I remembered it.”

He said that after that day, he received a phone call from the studio’s HR department. “A pleasant-sounding young man said, ‘Mr. Mosley, it has been reported that you used the N-word in the writers’ room.’ I replied, ‘I am the N-word in the writers’ room.’”

The HR rep informed Mosley that someone in the room had stated that his use of the word had made them uncomfortable, though he was not formally reprimanded. “[The] H.R. representative called to inform me that such language was unacceptable to my employers,” he continued. “I couldn’t use that word in common parlance, even to express an experience I lived through.”

Mosley went on to say that he decided to resign from the show following the call.

“There I was, a black man in America who shares with millions of others the history of racism,” he wrote. “And more often than not, treated as subhuman. If addressed at all that history had to be rendered in words my employers regarded as acceptable.”

Though Mosley did not specify which show it was, Variety has confirmed that it was “Star Trek: Discovery,” which is produced by CBS Television Studios.

“We have the greatest admiration for Mr. Mosley’s writing talents and were excited to have him join ‘Star Trek: Discovery,'” the studio said in a statement. “While we cannot comment on the specifics of confidential employee matters, we are committed to supporting a workplace where employees feel free to express concerns and where they feel comfortable performing their best work. We wish Mr. Mosley much continued success.”

Mosley is a celebrated novelist, most notably writing the Easy Rawlins mystery series. As a television writer, he currently works on the FX drama series “Snowfall.”

“Discovery” has had issues behind the scenes even before it made it to air. Original series showrunner Bryan Fuller departed the show just months before its premiere following multiple delays in launching the series. After that, Alex Kurtzman took over as showrunner midway though production on Season 2 after rumors of abusive behavior from co-showrunners Aaron Harberts and Gretchen J. Berg toward the show’s writing staff were reported.

The Hollywood Reporter first broke the news Mosley had left “Discovery.”