By early 1989, the Blackadder writers Richard Curtis and Ben Elton had already agreed on the setting for their hero’s fourth full incarnation, Blackadder Goes Forth , moving into the 20th century.

The team were contracted to begin recording in the late summer. With Tim McInnerny back in the fold after skipping a series, and Stephen Fry and Hugh Laurie as full-time players, alongside Rowan Atkinson (Blackadder) and Tony Robinson (Baldrick), the new line-up was just one way in which the latest series would be the ultimate distillation of everything that had gone before.

Though there was no question at the time of this being a finale, by bringing the Blackadder family so close to the modern day, everybody involved knew that this would not be just any other series.

One of many differences was the fact that, with the First World War in their sights, the writers decided that historical research was a necessity, for the first time. “With Blackadder two and three, we weren’t particularly respectful of the periods, but I don’t think we were really into any blatant howlers,” Elton says. “Obviously, with the First World War we had a very different approach.”

Ribbing the attitudes of centuries gone by was one thing, but finding humour in the deaths of 35 million people within living memory was not a task that anyone could countenance. “We read lots of books about it,” Curtis says. “They were interesting, because all the stuff we wanted to write about, which was sort of the clash of the classes, and getting stuck in a small confined space, was funny. All the people coming from communities where they’d never bumped into posh people, and vice versa, and all being so gung-ho and optimistic and enthusiastic… The first 100 pages of any book about the First World War are hilarious – and then everybody dies.”

Laurie says: “It was a really peculiar and bold thing to try and make a comedy out of, but I think ultimately a very sympathetic and respectful one. Even though the characters were absurd and moronic at times, it never disrespected their courage or their sacrifice.”

“Of all the periods we covered it was the most historically accurate,” says Atkinson. “We may have exaggerated the characters and what happened to them, but it is very difficult to exaggerate the absurdity and horror of the First World War. It may sound ridiculous for someone to face a court martial for shooting a pigeon, but madder things happened in reality. Towards the end of the war 30 soldiers were court-martialled and shot in France by our own side for not wearing a hat in the trenches. It is so absurd nobody would ever believe it.”

Robinson says: “We’d always said that more than anything what we’d like to do would be to create a series that was very claustrophobic, where the five or six of us who were the performers were trapped in a space. And what better way to feel that notion of claustrophobia than to set it in the trenches?”

“Good sitcoms, so the wisdom goes, are set in places where people can’t get out,” the producer John Lloyd continues. “Porridge in prison; in Fawlty Towers, Basil’s trapped with a ghastly wife that he can’t escape from and a business which is going bust but which is his only livelihood. And we set ours in a trench dugout where there’s only two ways to escape – one is forward to the German guns, the other is backwards to the British firing squads.”

Having begun the dynastic saga by chickening out of active service at Bosworth, finally a Blackadder was going to war, whether he liked it or not. This didn’t actually make Captain Blackadder brave, just in the wrong place at the wrong time, although Atkinson did sense a change with each dynasty. “In the first series, Blackadder was just an idiot. In the second series he was dashing but weak. As the butler, he became cleverer and nastier. This time he is less cruel and more careworn.”

“One of the things I love about series four,” Curtis says, “is that strangely I think Baldrick gained meaning. You know, he’d just been a fool and a butt the whole way through, but there was a remarkable thing that happened right at the end of that series, when he did suddenly seem to represent the working man.”

Fry’s character, General Melchett, although undeniably Colonel Blimpish, would go on to personify the dangerous ignorance of First World War high command like no other comic creation. “Young people playing old people are funny,” says Fry. “Because I was young and I was playing a General, it was somehow funnier than if I’d been the right age to be a general. With Blackadder the last thing you want is to take it too seriously. The audience relishes the sight of an actor enjoying himself. They like to see the gargantuan imbecility of it.”

He adds, however, “The Melchett in series four was a very different character to the one in two, he was much, much more aggressive, much more insane, much more powerful. He was really, for almost the entire series, the source of power. And he represents the absolute insanity of the war. Without being too pompous about Blackadder, it does I think illustrate perfectly the nature of that grotesque war.”

McInnerny was lured back with the promise of the series’ second all-new character, Blackadder’s weaselly and sycophantic equal. “Darling and Blackadder are kind of the same really,” Elton says, “lower-middle-class sort of semi-gentlemen. But obviously one of them has managed to connive his way on to the staff, and the other one’s bad-lucked into the trenches.”

As McInnerny recalls: “In the initial rehearsals, he wasn’t even called Darling, he was called Captain Cartwright, which is kind of dull. I mean, I didn’t even know who he was and couldn’t get an angle on him.”

“Darling is, I think, one of the great comic creations,” says Lloyd, “and it came from an actor’s determination to carve himself a place here.”

Fry continues, “Tim was a bit distressed because his character seemed to be nothing. He was called Cartwright, and I suggested, in a rare moment of brilliance, that maybe he should have a really silly name that was a constant torment to him… And suddenly this character was born out of nowhere, just because of the name!”

McInnerny’s transformation into the captain completed the strongest line-up of any Blackadder series, but as the writers may have reflected even at that early stage, Darling’s genesis did not augur well for a smooth production.

As Fry recalls: “I remember saying to Hugh and Rowan and John, ‘What will happen in six months’ time when a taxi driver says to you, “Oh, those Blackadders, I bet they’re fun to make, aren’t they?” Will you go “Yes, marvellous fun!”?’ And they all said, ‘No! We’ll be honest and say they’re hell!’”

“The producer is supposed to be the person who makes sure that inspiration doesn’t turn into complete filthy anarchy. Unfortunately, we had John…” Robinson says. “We workshopped every word, every exclamation mark! Although we didn’t have the 12 writers you would have for Taxi or Cheers, you had people in the room who were doing exactly the same kind of thing that those writers on an American show would do. We were constantly challenging every single gag, the structure of every scene – we even put additional characters in sometimes. So there was a lot of tension between the writers on the one hand, and the producer on the other, who was, as it were, the representative of what the actors were saying. And it was very good, but it could be quite upsetting sometimes.”

“I can’t tell you how profoundly competitive that environment is,” says Robinson, “but I contributed like mad. I think whenever I'm in a corner I always get noisy. Being the only grammar-school boy among that incredibly talented group of highly articulate performers, and having left school at 16, and not having been to university, there was a sense in which they always felt very different from me, really rather exotic, and yet in a way, not really kind of tuned in to the real world, because they all talked so elaborately. And I think that probably helped me with Baldrick.”

As Curtis acknowledges, there was only one place Blackadder Goes Forth was ever going to end up. “It was the condition on which we wrote the series. In a way it had been the arrow shot off at the beginning, that it was always going to land in No-man's-land… In a way, that set us free to be as disrespectful as we wanted to be at the beginning, because we were going to be respectful, or at least truthful, at the end.”

And McInnerny recalls the looming threat of the final big push: “The world-weariness of Blackadder was something kind of extraordinary. He was beaten down, he wasn’t necessarily going to win every time, and knew he wasn’t. Which gave it a kind of darker edge, I think… The extraordinary thing was that there really was only one plot, which was ‘how can we get out of here?’ I mean, every episode. But at the back of your mind, you think, ‘They can’t get out of it every week, they’re not going to be able to get out of it… Oh, they’re not going to get out of it.’”

As a valedictory theme for Blackadder’s last reincarnation, swapping the military rank-related episode titles for Weston & Lee's 1915 hit Good-bye-ee was an inspired move, leaving little doubt in the minds of those who read the synopsis for the conclusion in the television listings before settling down to watch on November 2 1989, that this was the end of the road for the anti-hero.

And yet, as Blackadder’s last desperate escape plan unfurled (pretending to be mad by putting two pencils up his nose and his underpants on his head), there was still hope that the scheming cad could somehow pull through.

For the cast and crew, however, the knowledge that such hope was fruitless made for a uniquely difficult week of recording. Laurie recalls: “It had as its backdrop the greatest tragedy of modern man, and that gave the thing a poignancy and a texture that few other things I’ve been involved in have had, or could have had.”

Atkinson concurs: “I do remember throughout the whole week of rehearsal leading up to Good-bye-ee, and indeed the recording of the episode, having this nasty knot in the pit of my stomach, which reflected the dilemma of my character.”

Nevertheless, there was the best part of half an hour of laughs to be had before any conclusion, and at last, the episode attained the truly claustrophobic atmosphere desired by Lloyd for so long, as the old comrades awaited their fate.

As the doomed soldiers waited for dawn, there was the traditional excess of jokes which would be trimmed out of the broadcast version, such as the dialogue before the celebrated debut of Baldrick as war poet:

Edmund: Hang on, Baldrick, you can’t even write!

Baldrick: I remembered it in my head, sir.

Edmund: I cannot believe that there is room in that tiny cavity for you to remember both your name and a poem.

Baldrick: I think there is, sir!

Edmund: All right, fire away, Baldrick.

Baldrick: Who’s Baldrick, sir?

Edmund: You are Baldrick!

Baldrick: Oh yes, that’s right – Bald-rick!

Edmund: Now, recite the poem.

Baldrick: What poem would that be, sir?

Edmund: No, look, forget who you are. [He does so.] Now let’s hear the poem.

Baldrick: ... ‘The German Guns’, by… Me.

“When Ben gave me the script with Baldrick’s poem on it, I just went, ‘Thank you!’” Robinson grins, and Fry adds, of the Tommy’s proud rendition of the word “Boom” 14 times: “It is fine poetry; this was the age of modernism, after all. So Baldrick was perhaps the leading modern poet of his age.”

Lloyd says, “Suddenly they’re all together, except for Melchett, and enmities have to be patched up, because at the end of the day, they’re all probably going to get killed. The comedy starts to drain out of it in the most horrific way, there was this very odd feeling that you’ve lost control of it.”

Right up until the very final few lines, with the four unlikely comrades lined up before the trench ladders, there’s still hope that a typical Blackadder – or even Baldrick – cunning plan could be waiting around the corner until Darling’s breathtakingly tragic outpouring of misplaced joy, “Thank God! We lived through it! The Great War: 1914 to 1917”, finally knocks the wind out of the hopeful viewer.

For the final push, an extra £10,000 had been spent on creating No-man’s-land in a separate studio, away from the audience who could only watch on the monitors. Lloyd remembers, “The actors were alone, in the dark, with a single assistant floor manager, and had to go over the top, with real explosions going off around them. After the first, shocking take, the studio audience and the production team were stunned into silence, but [the director] Richard Boden and I felt it could be done a bit better.”

It was five to 10, and they had one last chance to get the shot right. John spoke into the floor manager’s earpiece, but the reply came from Rowan himself, in “shattered” tones: “I’m sorry,” came the voice, “but we can’t do another one, it’s just too horrible.” “What do you mean, you’re not going to do it?” “It’s really the most frightening thing I’ve ever done, and we’ve all agreed we’re not going to do it, and I’m very sorry.” And with that, the line went dead.

“It was one of the lowest points, I think, of my television career,” Lloyd admits, “thinking, ‘The end of this amazing series, and I've just screwed it up!’”

Seeing the raw footage of the cast stumbling towards the camera, awkwardly striding towards eternity, it’s easy to see why the editing team had worries. However, Lloyd says, “Each person in that room, as I remember, made at least one contribution to the ending sequence.”

Chris Wadsworth, the editor, was chief among them. “It was so obvious that we had so little material to work with, we had to really slow the pictures right down in order to stretch them in time, but that produced an incredibly good effect with the flashes which were going over on the right of the picture, and the debris that falls over Rowan. In slow motion, this suddenly achieved a grandeur which was not obvious in the full motion.”

Lloyd continues: “In the editing suite we played the tape of Howard Goodall playing the theme on a piano, recorded in a gymnasium; a liquid, lonely sound. Then the editor said, ‘What if we played this shot in slo-mo?’ ‘Oh, that’s a good idea.’ ‘And if the music’s slowed down as well it suddenly becomes stronger.’

“Someone then suggested taking out the colour, draining it out to black and white. And the production secretary said, ‘I know. We could have some poppies. I know where there’s a slide of poppies.’”

Boden had always hoped to end on a poppy motif, and helped to select just the right still of bucolic peace, while someone from sound selected birdsong to complete the effect.

Wadsworth recalls the first time he mixed between the drained battlefield and the poppy field, and says, “It was a Yes immediately – this was a moment.” So, Lloyd proudly says, “There were about five or six people contributing bits and when you put it all together, blow me down, it’s the most moving thing you’ve ever seen. It’s extraordinary and to this day I feel a fantastic privilege that I was allowed, as it were, in the room where something as wonderful as that happened.”

And so, with the series beginning broadcast just as these final touches were being put in place, the team could breathe a sigh of relief that the Blackadder legacy would not be tarnished – but they couldn’t have predicted the unparalleled reaction Blackadder Goes Forth would get from the British public, who hadn’t anticipated that the series would reach its apotheosis on such a note of pathos and sincerity.

* This is an edited extract from The True History of the Black Adder by JF Roberts [Preface, £12.99]