Terry Pratchett in 2010. (Kirsty Wigglesworth/AP)

Terry Pratchett, the British fantasy writer who created the “Discworld” series that sold tens of millions of copies, died March 12 at his home, it was reported from London. He was 66.

Mr. Pratchett, who had a rare form of early onset Alzheimer’s disease, had earned wide respect in Britain and beyond with his dignified campaign for the right of critically ill patients to choose assisted suicide. His publisher announced the death.

Mr. Pratchett’s ability to write and speak had deteriorated in recent years as the disease progressed. But with his characteristic black fedora and neatly trimmed white beard he remained a familiar figure in the public eye. He completed his final book in the summer of 2014.

Mr. Pratchett was best known for “Discworld,” a series of more than 40 comic novels set in a teeming fantasy world that rests on the shoulders of four enormous elephants, which in turn are sitting on a giant turtle that swims through space. His novels, full of absurdist humor and populated by humans, goblins, vampires, nymphs and golems, have been translated into several dozen languages.

During the 1990s, he was Britain’s best-selling author — eventually surpassed by J.K. Rowling of the “Harry Potter” fantasy series.

Terence David John Pratchett was born on April 28, 1948, in the town of Beaconsfield, northwest of London. He described himself as a nondescript student who attended a technical high school because he felt woodwork would be more interesting than Latin. He was also interested in radios and computers; his father was an engineer.

He was 10 when he read by Kenneth Grahame’s children’s novel “The Wind in the Willows,” an experience that transfixed him. “Mole, Rat, Toad, Badger. All different sizes. All can go inside one another’s houses. All wear clothes. The toad, by no means a looker, can pass as a washerwoman. That enthralled me,” he told the London Guardian.

His first short story, “The Hades Business,” was published in a school magazine when he was 13 and was published commercially two years later. He used his proceeds to buy a typewriter and wrote regularly for the rest of the life, turning to journalism and writing novels in his spare time until the success of his fictional works allowed him to concentrate on them full time.

Mr. Pratchett married Lyn Purves in 1968 and published his first novel, “The Carpet People,” three years later. The “Discworld” series began in 1983 with the publication of “The Colour of Magic.”

Mr. Pratchett also published a series of well-regarded award-winning novels aimed at young readers.

The author disclosed his medical condition in 2007. His doctors at first believed he had suffered a stroke, but found him to have an unusual form of Alzheimer’s disease.

As he lost the ability to write on a computer, he turned to a dictation system that allowed him to keep producing fictional works, his agent Colin Smythe said.

Mr. Pratchett didn’t shy away from the emotional public debate about assisted suicide.

He used the prestigious Richard Dimbleby lecture in February 2010 to argue the logic of allowing people to end their lives at a time they chose. He said assisted suicide should be decriminalized and that suicide panels should be set up to judge cases, and offered his own case as an example.

In the lecture, Mr. Pratchett said there was no reason to believe a cure for his disease was imminent. He said he could live his remaining years more fully if he knew he would be allowed to end his life before the disease claimed him.

“I have vowed that rather than let Alzheimer’s take me, I would take it,” he said. “I would live my life as ever to the full and die, before the disease mounted its last attack, in my own home, in a chair on the lawn, with a brandy in my hand to wash down whatever modern version of the Brompton Cocktail some helpful medic could supply. And with Thomas Tallis on my iPod, I would shake hands with death.”

He received a knighthood from Queen Elizabeth II at Buckingham Palace in 2009 for his services to literature.

He also contributed $1 million to Alzheimer’s disease research and urged the scientific community to make it a higher priority.

Besides his wife, survivors include their daughter, Rhianna.

— Associated Press

Adam Bernstein contributed to this report.