John Nathan-Turner, who has died after a short illness aged 54, was the last and longest-serving producer of Doctor Who, the most successful and enduring British science-fiction series ever. Having served on the show for 20 years, worked with six of the seven Doctors, and maintained strong ties with the fan community, his contribution to the Doctor Who phenomenon cannot be understated.

His first job on the series was as floor assistant in 1969, alongside Patrick Troughton's Doctor. In the 1970s, he became assistant floor manager, then production unit manager, and, when incumbent producer Graham Williams died in 1980, Nathan-Turner was an obvious successor.

One of his first tasks was to find a replacement for Tom Baker, the fourth and most popular Doctor; he gave the role to Peter Davison, whose energy and vulnerability helped the show keep much of its huge following.

The most challenging pro ject Nathan-Turner faced during this early period was the 20th-anniversary story, The Five Doctors, in 1983. The idea was to reunite all five incarnations of the time lord in a feature-length adventure, but there were two obstacles: the first Doctor, William Hartnell, was dead, and Baker pulled out at the last minute. Nathan-Turner worked round the problem by casting Hartnell lookalike Richard Hurndall, and editing in footage of Baker from an untransmitted story.

When Davison left the series in 1984, Nathan-Turner took on the relatively unknown Colin Baker, whose efforts to establish himself were hampered by experiments with the Dr Who format and time slot. Crucially, the series lost its Saturday-teatime slot, moving instead to weekday evenings.

When viewing figures unsurprisingly slumped, BBC controller Michael Grade ordered that it be suspended. A press and public outcry ensured its reinstatement 18 months later, but the damage was done; ratings for the subsequent season were even poorer, and Baker left in acrimonious circumstances.

Nathan-Turner picked light entertainer Sylvester McCoy as Tardis occupant number seven, a controversial choice to which many pointed when viewing figures continued to fall (sometimes as low as 3m; in Baker's heyday, they had peaked at 13m). In truth, this had less to do with any decrease in quality than the fact that Dr Who was now being scheduled against Coronation Street.

The BBC pulled the plug on the 26-year-old series in December 1989, but Nathan-Turner's involvement continued. The demand for Who products - documentaries, interviews, radio serials, conventions - led to him becoming the corporation's unofficial Whovian consultant; he co-wrote a Doctor Who skit for the 1993 Children in Need campaign, advised the monthly Doctor Who magazine, corresponded with fans, gave interviews with fanzines and attended conventions.

As its last producer, Nathan-Turner is often associated with the decline and fall of Who. But while budgetary constraints never allowed him to exterminate the wobbly sets, fancy-dress shop aliens and uncrowded crowd scenes, his era produced some of the series' most memorable moments: the surprise return of the Doctor's arch-enemy, the Master (1981); the shocking death of one of his compan ions (1982); and a Dalek actually going up the stairs (1988).

Born and raised in Birmingham, Nathan-Turner left King Edward VI school for Birmingham's Alexandra Theatre, where he acted and worked as assistant stage manager. He joined the BBC in London in 1968, where he also worked on a number of drama series, such as All Creatures Great And Small, The Pallisters, and Angels.

Nicholas Courtney writes: When John became producer of Doctor Who, I saw him at a farewell party for Tom Baker, and accepted with alacrity his offer to return as my regular character, the Brigadier, alongside Peter Davison.

Largely because of John, America became interested in the programme, and I accompanied him to numerous Doctor Who conventions there. Apart from his involvement with the series, he produced charitable events in Brighton, where he lived, and elsewhere. He wrote and directed many pantomimes, most of which were produced by his production company.

Shortly before his death, John was writing and devising a children's television series, which was to have been narrated by Tom Baker. A generous, understanding man who loved actors, he was always prepared to give of himself to the many fans of the programme.

· John Nathan-Turner, television producer, born August 12 1947; died May 1 2002

The following correction was printed in the Guardian's Corrections and Clarifications column, Tuesday May 14 2002



The obituary of John Nathan-Turner said that "his contribution to the Dr Who phenomenon cannot be understated". Most things can be understated. The opposite, overstated, was what was meant.