Robin Williams missed out on playing Remus Lupin.

On Thursday, director Chris Columbus revealed that the late star was interested in playing the werewolf who is first introduced in "Harry Potter and the Prisoner of Azkaban," the third book and film in the franchise.

According to Columbus, Williams lost out on the role because hiring him would have broken a rule to avoid casting any American actors in an attempt to "maintain a degree of authenticity."

"I had a conversation with Robin Williams, who wanted to play Lupin," Columbus told Total Film, as quoted by GamesRadar. "It was very difficult for me to say, ‘It’s all British. There’s nothing I can do.’"

ROBIN WILLIAMS' DAUGHTER PLEADS WITH FANS TO STOP 'SPAMMING' HER WITH VIRAL IMPRESSION OF HER FATHER

Columbus, who directed both the first and second "Harry Potter" films, is American. Mexican film director Alfonso Cuarón took on the third film, which features Lupin, played by British actor David Thewlis. The 58-year-old played the role until his final appearance in 2011.

Robin Williams

Robin Williams expressed interest in being part of the ‘Harry Potter’ film franchise. (Photo by Peter Kramer/Getty Images)

In 2016, casting director Janet Hirshenson told U.K.'s HuffPost that Williams was turned down for the role of Hagrid.

"Robin had called [Chris Columbus] because he really wanted to be in the movie, but it was a British-only edict, and once he said no to Robin, he wasn’t going to say yes to anybody else," she said at the time. "It couldn’t be."

That role was played by Scottish actor Robbie Coltrane.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Williams, who passed away in 2014 at age 63, told the New York Post in 2001 he lobbied for a role in the "Harry Potter" franchise.

"There were a couple of parts I would have wanted to play, but there was a ban on American actors," said the star, as quoted by U.K.’s Independent.

Robin Williams Harry Potter

Actor Robin Williams at the N.Y. Premiere of 'Harry Potter and the Sorcerer's Stone' at the Ziegfeld Theatre in New York City, circa 2001. (Photo: Evan Agostini/ImageDirect/Getty Images)

"Maybe one day," said Williams. "Say if [Harry] goes to Yale and becomes president."

CLICK HERE TO GET THE FOX NEWS APP

The outlet noted that Williams attended the New York premiere of "Harry Potter and the Philosopher’s Stone."