Image copyright Getty Images Image caption Hal discovered a plan by Dave (Keir Dullea) and Frank (Gary Lockwood) to disconnect him

Actor Douglas Rain, who was the voice of the sinister computer Hal in sci-fi film 2001: A Space Odyssey, has died, the organisers of a theatre festival he founded have said.

Rain died at the age of 90, according to the Stratford Festival in Canada.

The actor performed for 32 seasons at the Shakespearean festival and was nominated for a Tony Award in 1972.

But he will be best remembered as the voice of Hal 9000, the AI computer in Stanley Kubrick's landmark 1968 film.

Hal controlled the spacecraft's functions, but ended up rebelling against its human commanders when they planned to disconnect him after suspecting he was malfunctioning.

The film is regarded as a cinematic masterpiece and won an Oscar for Kubrick for best visual effects.

Rain's chilling, dry voice is key to the drama, but he wasn't the first choice to play the computer.

The director originally selected Oscar winner Martin Balsam - but decided he was "too colloquially American".

He also considered actor Nigel Davenport in the role, but later concluded he did not want a British voice.

So he called upon Rain after hearing his voice in the 1960 documentary Universe, according to The New York Times.

The actor recorded all his lines in 10 hours over two days, with the director sat "three feet away, explaining the scenes to me and reading all the parts", he said.

But, according to the New York Times, Rain never saw the finished film.

Stratford Festival's artistic director Antoni Cimolino said the actor shared Hal's intelligence - with added "warmth and humanity".

Anthony Hopkins said Hal influenced his performance as serial killer Hannibal Lecter in The Silence of the Lambs.

Beyond 2001, Rain was an accomplished stage and screen actor, and earned his Tony nomination for his role in Robert Bolt's Vivat! Vivat! Regina! on Broadway.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.