The “Pirates of the Caribbean” movie franchise is one of Disney’s top grossing films. It was made even more memorable with Johnny Depp’s unique portrayal of the character Captain Jack Sparrow. However, the actor recently revealed that he almost lost the chance to be a part of the movie, given the way he brought the iconic character to life.

Depp recounted how Disney executives were not happy with his “Pirates of the Caribbean” acting, during a panel at the American Film Institute held Sunday, People magazine reported. The actor shared how the studio “wanted to fire [him]” since they didn’t understand why he portrayed the character that way.

"I remember it trickled back to me that [former Disney CEO] Michael Eisner went on some sort of vent about how, 'Godd-----, Johnny Depp's ruining the film. What is it? What is that thing? Is it drunk? Is it gay?' So I fully expected to be fired,” he said. 

The “Black Mass” actor also shared a conversation he had with another Disney studio executive who asked him “what the f--- [he was] doing” with the role. Depp responded, "I said, well, didn't you know that all my characters are gay?"

At that moment, Depp mentioned that he was sure the studio will let him go, however, he did not receive walking papers from the “Pirates of the Caribbean” movie project. "I was really expecting to be fired. But they wouldn't for some reason,” he stated.  “They were actually going to subtitle my character – they couldn't understand Captain Jack."

The “Pirates of the Caribbean,” which was released in 2003, was one of Disney’s most lucrative films. It led to three more successful movie installments, with the fifth one, “Pirates of the Caribbean: Dead Men Tell No Tales,” set to hit movie theaters in 2017. Depp’s portrayal of Sparrow also gained him a Best Actor Oscar nomination.

In other news, Depp will soon lend his voice to the animated film “Sherlock Gnomes,” Entertainment Weekly reported.  The movie is a sequel to the 2011 hit “Gnomeo & Juliet” animated film which starred James McAvoy and Emily Blunt. “Sherlock Gnomes” is written by Ben Zazove and will be directed by John Stevenson. Depp will star as the title character for the Paramount Animation and MGM film.

“Sherlock Gnomes” is slated for a Jan. 12, 2018 release.