I really tried to make this book last. It's the last Discworld novel, written by Terry Pratchett in the last days of his life, as his death from a tragic, unfair, ghastly early onset Alzheimer's stole up on him. But I couldn't help myself. I read it, read it all. I wept. Then I read it again.

The Shepherd's Crown is the fifth and final book in the Tiffany Aching sequence, a collection of five novels within the greater, 41-volume Discworld series, which Pratchett began in 1983. The Tiffany Aching books were Pratchett's personal favorites, a fact that had puzzled me, because as good as they were, they seemed slight alongside of the Moist von Lipwig books, whose exploration of the way that modernity and technological change rippled out through society really resonated with me.

But in The Shepherd's Crown, I've come to realize what it is about these books that makes them so special and endeared them so well to Pratchett's own heart: it's their compassion.

When we first met Tiffany Aching, she was a shepherd's daughter whose grandmother, Granny Aching, is the "shepherd's shepherd," a worker of magic and a keeper of animals, revered by all the people of the Chalk. Through the subsequent volumes, Tiffany and her companions, the Nac Mac Feegles, have have encountered more and more of the Discworld's other denizens: Granny Weatherwax and Nanny Ogg and the other Lancre witches, the wicked elves of Faerie, and so on. Along the way, Tiffany has grown to understand duty, and service, and compassion.

In The Shepherd's Crown, Tiffany's coming of age arrives at its climax, and Pratchett uses her challenges to bring her into contact with a much wider piece of the Discworld. More importantly, he makes her confront impossible situations — wicked problems where someone must lose. Into this action, Pratchett introduces all kinds of symmetries and touches in on some of the Discworld's old threads: the old romance between Granny Weatherwax and Archchancellor Ridcully, the ongoing story of the railroad (see Raising Steam), the social pecking order of witches, and the relationship of gender to witchcraft and wizardry, first explored in 1987's Equal Rites.

What makes this book so great — what made Pratchett so great — is his commitment to making jokes into something more than gags. The early Pratchett Discworld novels were rather thin by comparison to the later ones (he confesses as much in some of his essays), because Pratchett got better as he went along. Pratchett's early work was dominated by puns, Douglas-Adams-ish comic footnotes (that often fell short of Adams's high standard) — cheap yucks.

But Pratchett got better. Lots better. He didn't get better by giving up on those cheap yucks: he got better by making them into something more than cheap yucks. The Nac Mac Feegle are a silly gag about Scottish, drunken, ultraviolent Smurfs. In the Wee Free Men, Pratchett played with this notion, figured out where and how he could push it around.

Five books later, the Nac Mac Feegle aren't a gag anymore. They're full-blown characters, and if there are running gags about them all being called things like No'-as-big-as-Medium-Sized-Jock-but-bigger-than-Wee-Jock Jock, they are garnish, not the main dish, which is a deft way of using these spear-carriers to move the story into complicated places where Tiffany's wisdom, self-confidence, compassion and sense of duty are all tested.

I keep using the word "compassion" in my descriptions of this book, because if there's one word that sums up the writer Terry Pratchett had latent in him in those early days, and the writer he came to be, and the literary legacy he left behind, it's compassion.

I saw a post on Seanan McGuire's Tumblr last week that stuck with me, about the difference between "sympathy" ("I know how you feel"), "empathy" ("I feel how you feel") and "compassion" ("is there anything I can do to help?"). Pratchett's characters are often unsympathetic, they are sometimes not very empathic — there are times when I could smack Sam Vimes — but they are moved by compassion more than anything else. Even the murderers. Even Lord Vetinari.

Terry Pratchett wrote this book knowing that he was dying, and he wove into it all the compassion he could muster. That meant, perforce, bringing in the railway, the goblins, and the themes of modernity versus society. Because engaging with modernity is the fantasy writer's trick, something science fiction writers struggle with. The rural and agrarian lives that are romanticized in fantasy are also places in which compassion reigns. You may have a wicked feudal lord and a venal priest, you may wallow in filth and starve when the crops fail, but you have a place, centuries old and immobile, and that place means that you belong, you have worth, and there are people who are enmeshed with you in a web of obligations.

Modernity rips that apart, and sometimes it fails to replace with anything comparable. Even today, we worry about the way that technology atomizes us, the way that migration breaks apart our social ties. I feel those worries all the time. Technology has given me myriad ways to connect, don't get me wrong, but it's also disconnected me from some things I rather loved.

The Moist von Lipwig books I liked best are all about this, and that's why I love them so. With The Shepherd's Crown, Pratchett joins the agrarian and the modern, witchcraft and engineering, fusing the two themes in a way that feels like the artistic climax of a prodigious and brilliant career.

I loved this book. I loved it even when it tore my guts out. If you love Pratchett, I guarantee it will tear your guts out too, and even though I'm not someone who worries much about spoilers, this one is big and I'm going to leave it to you to discover. But you've been warned.

An afterword to the book explains that Pratchett died before this book was as polished as his other pieces, and there are little ways in which you can see that, a few plotlines left dangling, a few pieces of exposition that could have been turned into drama. That said, it is so polished in comparison to, say, Equal Rites, the contrast illustrates just how far we travelled with Pratchett down his artistic path.

I can't believe that this is the last Discworld novel. 41 books sounds like a lot. It is a lot. But there was clearly so much more to come, and it's such a cheat to have had it all taken away. Pratchett's death is a great tragedy, a loss to us all. He did us a huge service by devoting his last years to writing so many books after his diagnosis — more than he thought he'd be able to write — and this last book is such a gift to all of us.

I just wish there was more.

The Shepherd's Crown [Terry Pratchett/Harpercollins]