"If one company or small group of people manages to develop god-like superintelligence, they could take over the world," Musk said in the film.
He continued: "At least when there's an evil dictator, that human is going to die. But for an AI, there will be no death – it would live forever. And then you would have an immortal dictator from which we could never escape."
He's basically saying governments or other entities could create a dangerous AI that could outlive human leaders and never be destroyed – and that one way to avoid this is to democratize AI.
The documentary Do You Trust This Computer? presents a sobering look at the potential dangers of AI, including what could happen if AI evolves to be smarter than humans and becomes its own master.
"We are rapidly heading towards digital superintelligence that far exceeds any human," Musk said. "I think it's very obvious."
He added: "We have five years. I think digital superintelligence will happen in my lifetime, 100%."
The problem with a superintelligent AI is that, should it become smarter than humans, we could lose control of the technology.
The film posits that if the AI has a goal, it might try to achieve it in a way that humans might not agree with, but there would be no way to stop it.
"AI doesn't have to be evil to destroy humanity – if AI has a goal and humanity just happens in the way, it will destroy humanity as a matter of course without even thinking about it, no hard feelings," Musk said.
"It's just like if we're building a road and an anthill happens to be in the way, we don't hate ants, we're just building a road, and so goodbye anthill."
Musk's warning echoes his previous grim predictions about the perilous nature of AI.
Musk tweeted in early September that "competition for AI superiority at a national level" would most likely be the cause of a World War III, and he has said AI is the greatest risk facing civilisation.
You can watch "Do You Trust This Computer?" in full on the film's website until Sunday evening.
This article was originally published by Business Insider.
More from Business Insider: