Stephen Hawking's final fear was that DNA manipulation would lead to a master race of superhumans, it has been revealed.
The physicist, who died in March aged 76, thought the development could destroy the rest of humanity.
His last prediction is revealed in a new book of his collected articles and essays called?Brief Answers to Big Questions.
He feared rich people would soon be able to edit their children's DNA to improve attributes like memory and disease immunity.
And he said that would pose a crisis for the rest of the world even if politicians tried to outlaw the practise.
In an extract published by?The Sunday Times?, he wrote: "I am sure that during this century people will discover how to modify both intelligence and instincts such as aggression.
"Laws will probably be passed against genetic engineering with humans. But some people won't be able to resist the temptation to improve human characteristics, such as memory, resistance to disease and length of life."
And he said that would cause huge problems for humans who have not undergone the same process, leaving them unable to compete.
The professor even warned it could lead to the extinction of humanity as we know it.
He said of normal humans: "Presumably they will die out, or become unimportant.
"Instead, there will be a race of self-designing beings who are improving at an ever-increasing rate."
The?Brief History of Time?author also refers to techniques like Crispr, which enables scientists to modify harmful genes and add in others.
And although such procedures could be a boost for medical science, some critics are concerned they could lead to a eugenics-style movement, where the weak are weeded out of society.
The new book, published by Hodder & Stoughton on Tuesday, also collects his writings on what he thought were the big questions facing science and wider society.
In it, he examines whether aliens exist, how to colonize space and whether humans will ever go beyond our Solar System.