Please, I thought as I opened the first page of A Darkling Plain, please don't be a disappointment. Picking up the fourth and final book in a quartet is a nerve-racking experience. Will it spoil the expectations created in the previous three? Will the writer have grown plump and complacent, fattened by his success? Will he skid and crash? Or run out of energy? Or, worst of all, avoid a resolution, giving himself the option to write a fifth, a sixth, a seventh?

Five years ago, Philip Reeve published Mortal Engines, an adventure story set a couple of thousand years in the future, a brilliant mixture of action, science fiction and whimsy. After the Sixty Minute War destroyed 21st-century civilisation, humans have gradually put themselves back together, creating a society based on an ideology named Municipal Darwinism. People live in movable cities that roam the planet, attacking and looting smaller, weaker cities. The story opens with a naive teenage boy, Tom Natsworthy, rushing through London, heading for an observation platform, hoping to watch his own city gorge a small town and strip its assets.

Mortal Engines was followed by Predator's Gold and Infernal Devices. Now, by the beginning of A Darkling Plain, Tom is a weary, middle-aged man, knowing that his heart hasn't much strength left. Earth is facing a cataclysmic battle. Human society is divided into two groups, the Green Storm and the Traction League, which are locked in unresolvable conflict. And there's another, fiercer threat: a weapon that's waiting high in the skies, placed there by the Ancients, those idiots who built enough bombs to blow up their entire planet.

This might sound a bit pompous or pretentious. It's not. There's a fabulous streak of frivolity running through absolutely everything that Reeve writes. His characters have great names: Nutella Eisberg, Dornier Lard, Lurpack Flint. (Maybe he writes in the kitchen.) Jokes cascade through the text and Reeve always has a lot of fun with the junk that the Ancients left behind. Tom finds a glittering circular "seedy", for instance, and hears rumours of an "eye-pod", a mysterious device which the Ancients used to "store thousands of songs on tiny little gramophone records".

Like many of the great writers who can be read happily by both adults and children, Reeve uses the frivolity to hide his own seriousness. In this book, he finally reveals what lies behind the rampaging brutality that has turned city against city, human against human. A fascistic soldier, Wolf Kobold, explains the core of his beliefs: "the simple, beautiful act which should lie at the heart of our civilisation: a great city chasing and eating a lesser one. That is Municipal Darwinism. A perfect expression of the true nature of the world: that the fittest survive." The same soldier owns a statue, an icon of the deity that he worships - "an eight-armed image of the Thatcher, all-devouring goddess of unfettered Municipal Darwinism".

This is a long book, building on three previous books, none short. Reeve has created hundreds of characters, scores of cities, a world of his own, which he has then torn apart, flaying his population with death and destruction. His writing is often sparkling and witty, but almost as often opaque and odd and extremely confusing. But by the end of the quartet, all this effort - Reeve's and the reader's - turns out to have been worthwhile. Much more than worthwhile. The last few chapters of A Darkling Plain are magnificent, drawing together everything that we have experienced over hundreds and hundreds of pages. The finale is moving. And the last cunning twist that ends the book might be a little tricksy, but it's also apt and beautiful and very satisfying. With this quartet, Reeve has created an extraordinary imaginative achievement. Read it. You won't be disappointed.