A screen adaptation of Neil Gaiman and Terry Pratchett’s celebrated 1990 fantasy Good Omens was in the works for nearly two decades, and outlived Pratchett himself, who died in 2015 when the future of the project was still in doubt. It’s impossible to say how the version of Good Omens that arrives May 31 on Amazon compares to the feature Terry Gilliam planned to direct, or the series that Terry Jones had been co-writing.

But this take on the material, scripted entirely by Gaiman and directed by TV veteran Douglas Mackinnon, lacks the anarchic spirit a visionary like Gilliam might have brought to the material. It’s entertaining, although stretched a bit thin over six hour-long episodes, and it features two appealing and funny lead performances from Michael Sheen and David Tennant. The overall effect is a little underwhelming, but there are plenty of clever, fun moments along the way.

RELATED: Good Omens: Neil Gaiman on Landing His 'Dream Cast'

Sheen and Tennant play the angel Aziraphale and the demon Crowley, respectively, who have lived among humans since the Garden of Eden, when Crowley was the snake who tempted Eve with the Tree of Knowledge and Aziraphale was tasked with guarding the gates. Over the millennia, they’ve become accustomed to life on Earth (where both have settled in London), and have formed a mutually beneficial relationship unbeknown to their superiors in Heaven and Hell. So they are somewhat distressed at the prospect of impending Armageddon, courtesy of the young Antichrist, whom Crowley is meant to place as a newborn with an American diplomat’s family.

The world is set to end when the Antichrist comes of age at 11, but Aziraphale and Crowley hope to avert the war between Heaven and Hell by influencing the boy to be neither good nor evil, just an ordinary kid. Trouble is, they spend years focused on the wrong child, thanks to a mix-up at the hospital. So Armageddon remains on schedule, as various other forces and factions work to encourage or avert it.

RELATED: American Gods Renewed for Season 3 With New Showrunner

The mix of lowbrow humor (a wacky misunderstanding!) and supernatural intrigue is the story’s defining trait, but it’s also a tricky balance to maintain, and the series sometimes lurches awkwardly from one to the other. Sheen and Tennant have a great buddy-comedy dynamic, arguing with each other over theological principles but also clearly affectionate and respectful. The most satisfying aspect of the series isn’t the story of the potential apocalypse, but rather the development of the friendship between these two celestial beings who come to love both humanity and each other.

Their development resembles the journey of Ted Danson’s Michael on afterlife comedy The Good Place, and there’s a similar whimsical delight to Sheen and Tennant’s performances. Sheen gives Aziraphale a wide-eyed wonder that never fades, even in the face of horrific events, and Tennant seems to be channeling Bill Nighy’s acerbic wit as Crowley, whose contempt for everything and everyone barely masks an enthusiasm for the human world. The rest of the characters aren’t nearly as fun to watch, and the show almost always drags when it cuts  to supporting characters in various subplots, especially the machinations of the other angels, demons and supernatural forces.

RELATED: Lucifer Season 4 Is Exactly What Lucifans Prayed For

A handful of big names show up in small roles, including Jon Hamm as the smug, officious archangel Gabriel, Nick Offerman as the American diplomat meant to raise the Antichrist, and Frances McDormand as the voice of God, whose curiously flat narration sometimes makes the show sound like a hastily produced audiobook. The best supporting performance comes from Adria Arjona as Anathema Device, descendant of the witch Agnes Nutter, whose book of prophecies is the only 100-percent accurate set of predictions ever produced, and serves as a guidebook for both anticipating and avoiding Armageddon.

Even Anathema’s subplot, in which she hooks up with a timid descendant of the witchfinder who burned Agnes at the stake, is mostly superfluous, and the detours about gathering the Four Horsemen of the Apocalypse or tracking the history of the witchfinder army are mildly amusing at best, and are sometimes hampered by questionable special effects. The connection between Anathema and junior witchfinder Newton Pulsifer (Jack Whitehall) sometimes feels as if it belongs on a separate show, as do the misadventures of the actual Antichrist, a small-town English boy named Adam (Sam Taylor Buck), and his three best pals. It’s not a great sign when the Antichrist feels like a footnote in the story of his own ascension.

Of course, the story is really about Aziraphale and Crowley, and as long as it keeps coming back to them, it shines. After finding such success with the lush and serious adaptation of American Gods, Gaiman (who serves as the showrunner here) may have been wary of going too comedic with Good Omens, but it works best as a witty comedy about mismatched beings of the hereafter bumbling their way around Earth. Terry Gilliam might have made something great out of it, but this uneven series is still largely good enough.

Starring Michael Sheen, David Tennant, Adria Arjona, Michael McKean, Miranda Richardson, Sam Taylor Buck, Jack Whitehall and Jon Hamm, Good Omens premieres with all six episodes May 31 on Amazon Prime.