In a new documentary, Elon Musk warns that an 'immortal' digital dictator could forever trap humanity in its grasp unless we start regulating technology ASAP.

Imagine your least-favorite world leader. (Take as much time as you need.)

Now, imagine if that person wasn't a human, but a network of millions of computers around the world. This digi-dictator has instant access to every scrap of recorded information about every person who's ever lived. It can make millions of calculations in a fraction of a second, controls the world's economy and weapons systems with godlike autonomy and — scariest of all — can never, ever die.

This unkillable digital dictator, according to Tesla and SpaceX founder Elon Musk, is one of the darker scenarios awaiting humankind's future if artificial-intelligence research continues without serious regulation. [Super-Intelligent Machines: 7 Robotic Futures]

"We are rapidly headed toward digital superintelligence that far exceeds any human, I think it's pretty obvious," Musk said in a new AI documentary called "Do You Trust This Computer?" directed by Chris Paine (who interviewed Musk previously for the documentary "Who Killed The Electric Car?"). "If one company or a small group of people manages to develop godlike digital super-intelligence, they could take over the world."

Humans have tried to take over the world before. However, an authoritarian AI would have one terrible advantage over like-minded humans, Musk said.

"At least when there's an evil dictator, that human is going to die," Musk added. "But for an AI there would be no death. It would live forever, and then you'd have an immortal dictator, from which we could never escape."

And, this hypothetical AI-dictator wouldn't even have to be evil to pose a threat to humans, Musk added. All it has to be is determined.

"If AI has a goal and humanity just happens to be 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. So, goodbye, anthill."

Those who follow news from the Musk-verse will not be surprised by his opinions in the new documentary; the tech mogul has long been a vocal critic of unchecked artificial intelligence. In 2014, Musk called AI humanity's "biggest existential threat," and in 2015, he joined a handful of other tech luminaries and researchers, including Stephen Hawking, to urge the United Nations to ban killer robots. He has said unregulated AI poses "vastly more risk than North Korea" and proposed starting some sort of federal oversight program to monitor the technology's growth.

"Public risks require public oversight," he tweeted. "Getting rid of the FAA [wouldn't] make flying safer. They're there for good reason."

"Do You Trust This Computer?" focuses on the growing public health and safety concerns linked to the rise of AI, and contains interviews with many other tech moguls, researchers and Erica the creepy news-casting robot. The documentary is available to watch for free here until Sunday (April 8).

Originally published on Live Science.