(CNN) - The idea of computers taking over the planet and threatening to end humanity has been a science-fiction favorite for a long time, but if you thought it was all fiction and no science, think again.
Iconic physicist Stephen Hawking seems to agree with Hollywood, at least in part.
The iconic physicist said this week at Web Summit 2017 in Lisbon, Portugal that artificial intelligence could pose a threat, surpassing humans in a few decades.
He said A.I. could develop a will of its own - becoming "the worst or the best thing that has happened for humanity."
He pointed to the fact that technology already is threatening millions of jobs.
"Unless we learn how to prepare for, and avoid, the potential risks, AI could be the worst event in the history of our civilization. It brings dangers like powerful autonomous weapons, or new ways for the few to oppress the many. It could bring great disruption to our economy," he said, according to CNet.
Hawking, a self-described optimist, also said A.I. could also be helpful to humans.
He said the key is for companies and scientists to think about the long-term benefit to humanity as they pursue their short term goals with A.I.
Copyright 2017 CNN. All rights reserved.