The late actor was keen to play Hagrid, but the part went to Robbie Coltrane because producers wouldn’t waive rule banning non-Brits

Robin Williams was eager to play the half-giant gamekeeper Hagrid in the Harry Potter films – but was turned down by producers on account of his nationality.

Casting director Janet Hirshenson has confirmed that Williams fell victim to the “Brits-only” rule imposed by producers on the series of films. “Robin had called because he really wanted to be in the movie,” she told the Huffington Post, “but it was a British-only edict, and once he said no to Robin, he wasn’t going to say yes to anybody else, that’s for sure. It couldn’t be.”

The part went to Robbie Coltrane, who was reportedly JK Rowling’s first choice for Hagrid.

Williams had spoken about his thwarted Potter ambitions, telling the New York Post in 2001: “There were a couple of parts I would have wanted to play, but there was a ban on [using] American actors.”

Other key roles for which Williams was considered included leads in The Shining, Philadelphia, Richard Attenborough’s biopic of Charlie Chaplin and Gus van Sant’s film about Harvey Milk. He was also in the running for the part of a depressed professor in Little Miss Sunshine, which eventually went to Steve Carell.

Williams died in August 2014.

