"Grey's Anatomy" has experienced as much drama behind the scenes as in front of the camera, which Ellen Pompeo acknowledged in a Variety interview with "Empire" star Taraji P. Henson.

"The first 10 years we had serious culture issues, very bad behavior, really toxic work environment," Pompeo said.

An actor on the show was fired for using homophobic slurs. Another insulted the writing. There were rumors about resentment among the cast when one got a spinoff.

"But after Season 10, we had some big shifts in front of the camera, behind the camera," Pompeo said. It became my goal to have an experience there that I could be happy and proud about, because we had so much turmoil for 10 years. My mission became, this can’t be fantastic to the public and a disaster behind the scenes. Shonda Rhimes and I decided to rewrite the ending of this story. That’s what’s kept me."

ABC has renewed "Grey's Anatomy" for Seasons 16 and 17, which will make it the longest-running medical primetime drama in TV history.

Pompeo also spoke candidly about the pay disparity she experienced in the first few years of the show, even though she played the lead character.

"Patrick Dempsey left the show in Season 11, and the studio and network believed the show could not go on without the male lead. So I had a mission to prove that it could," she said.