Terry Pratchett never got to write the ending he wanted for The Shepherd's Crown, the bestselling author Neil Gaiman has said – and moreover, he wanted his unfinished work run over by a steamroller.

In an interview with The Times, Gaiman revealed that his long-time friend, who died in March aged 66, had planned a different ending to the one that was published yesterday but had died before getting it down on paper.

"This is still the saddest moment for me,” Gaiman said. “When I talked to Terry about it there was one little beautiful twist that would have made people cry, but he never got to write it."

The Shepherd's Crown is the 41st and final book in Pratchett's phenomenally successful Discworld series, which has won a cult following the world over.

WARNING: spoilers for The Shepherd's Crown follow

The book has devastated readers with the death of the witch Granny Weatherwax, a major Discworld character and longstanding fan favourite.

Readers who have finished the book may have guessed what Pratchett originally intended, which was that Weatherwax had "actually put her consciousness into You, the cat". Hints of this plan remain in the published book, which suggests that You is no longer wholly feline.

Gaiman said: "We think that Death has come for Granny Weatherwax, but it hasn't and we think that she is dead but [she isn't]".

There was to have been a final scene in which Weatherwax says: "I am leaving on my own terms now."

Only then, Gaiman said, would "Death turn up to take her for good".

The scene "would have made the book, but he never got to write it. He simply ran out of time", he added.

It would have been an even more poignant ending from Pratchett, who suffered the "embuggerance" of Alzhiemer's disease for more than seven years and was a fierce campaigner for the right to die.

The Shepherd's Crown has received positive reviews from readers and critics. The Telegraph's Kat Brown gave it five stars, calling the novel "a magnificent sign-off".

However, Gaiman says that his friend didn't want his unfinished work to be published. The American Gods author said Pratchett wanted "whatever he was working on at the time of his death to be taken out along with his computers, to be put in the middle of a road and for a steamroller to steamroll over them all".

Along with Pratchett’s millions of fans, Gaiman said that he was "ridiculously glad that hasn't happened".

The author also revealed that he was working on Pratchett's last request: a TV adaptation of Good Omens, the 1990 novel they wrote together about an angel and demon working together to foil the Apocalypse. It has previously been made into a successful Radio 4 series.