Professor Stephen Hawking, who once said he thought assisted dying was "a great mistake", has changed his stance to support the right of terminally ill people who are suffering to end their lives.

Hawking, 71, was diagnosed with Lou Gehrig's disease – a form of motor neurone disease – at the age of 21 and was told he had only two or three years to live.

He said in 2006 that, although people should have the right to end their life if they wanted to, "I think it would be a great mistake. However bad life may seem, there is always something you can do, and succeed at. While there's life, there is hope."

But in an interview with the BBC, Hawking, a cosmologist and theoretical physicist, offered his unqualified support to those who feel their life is no longer tolerable.

"I think those who have a terminal illness and are in great pain should have the right to choose to end their lives and those that help them should be free from prosecution," he said. "We don't let animals suffer, so why humans?"

He is concerned, however, that there must be safeguards to ensure that nobody's life is terminated against their wish. In 1985, when he became very ill with pneumonia, he was at one stage placed on a life support machine. His first wife, Jane Hawking, was given the option to turn it off.

"There must be safeguards that the person concerned genuinely wants to end their life and they are not being pressurised into it or have it done without their knowledge or consent as would have been the case with me," he told the interviewer.

Hawking has been held up as the supreme example of a human being who has triumphed over a failing body to achieve scientific and literary success. Only 5% of those diagnosed with Lou Gehrig's disease survive for more than a decade. Hawking cannot move and communicates through a computer slowly and laboriously, but produced the scientific bestseller A Brief History of Time, which sold 10m copies. Opponents of assisted dying have cited him as an example of why the law should not be changed.

His words are likely to further fuel the debate after tragic public appeals by several people who are terminally ill to be allowed to end their lives, including Tony Nicklinson, who lost his high court case for a change in the law to allow him help to die at home. Nicklinson then refused food and died within the week.

The Dignity in Dying chief executive, Sarah Wootton, said the British Social Attitudes survey in 2007 found that a large majority of both disabled and non-disabled people support a change in the law.

"Professor Stephen Hawking's comments reinforce that, providing proper and rigorous safeguards are in place in an assisted dying law, there is no reason to oppose a law which gives dying people the right to choose the manner and timing of their death," she said.

"Lord Falconer's assisted dying bill, due to be debated in the House of Lords next year, includes robust legal safeguards which would better protect people than the current situation where the law turns a blind eye to those helping loved ones to die. Such a change would not result in more people dying, but in fewer people suffering."