Humanity is at risk from a series of dangers of our own making, according to Prof Stephen Hawking.
Prof Hawking is giving this year's BBC Reith Lectures, which explore research into black holes, and his warning came in answer to audience questions.
He says that assuming humanity eventually establishes colonies on other worlds, it will be able to survive.
"Although the chance of a disaster to planet Earth in a given year may be quite low, it adds up over time, and becomes a near certainty in the next thousand or ten thousand years.
"By that time we should have spread out into space, and to other stars, so a disaster on Earth would not mean the end of the human race.
"However, we will not establish self-sustaining colonies in space for at least the next hundred years, so we have to be very careful in this period."
Reith Lectures: Prof Stephen Hawking
BBC News online will be publishing the text of Prof Hawking's lectures with accompanying notes by our science editor, David Shukman.
iWonder: A brief history of Stephen Hawking
It is ironic that such a prominent figure in science identifies scientific progress itself as the major source of new threats.
On previous occasions, he has highlighted the potential risks of artificial intelligence (AI) becoming powerful enough to cause the extinction of the human race.
But he insists that ways will be found to cope.
"We are not going to stop making progress, or reverse it, so we have to recognise the dangers and control them. I'm an optimist, and I believe we can."
Asked for advice for young scientists, Prof Hawking said they should retain a sense of wonder about "our vast and complex" Universe.
"From my own perspective, it has been a glorious time to be alive and doing research in theoretical physics. There is nothing like the Eureka moment of discovering something that no one knew before."
But he also said that future generations of researchers should be aware of how scientific and technological progress is changing the world, and to help the wider public understand i