A pioneer of British television, Barry Letts, who has died aged 84, served the medium for more than half a century. As an actor, he was rarely off screen in the embryonic days of television drama. Later, as a producer and director, his early-evening dramas commanded large and loyal family audiences. But it was through his work on Doctor Who that he secured his place in TV history. He steered the series through one of its most popular eras when he inherited Jon Pertwee as the Doctor in October 1969, and one of the last acts of his five-year tenure as producer was to cast Tom Baker (after considering Jim Dale and Michael Bentine) as his successor. Because the episodes with Pertwee were set on Earth, with the Doctor seconded to the military organisation UNIT, they proved more accessible for non-fans, and the series reached a huge audience.

Letts was a Buddhist, and his beliefs influenced his contributions to the series, such as the episode The Green Death (1973), co-written with Robert Sloman, which reflected his ecological concerns. It was also Letts who gave the Doctor a journalist companion, Sarah Jane Smith (Elizabeth Sladen), who, in a departure from the passive assistant role, could give as good as she got – creating a dynamic that has survived in the programme's latest incarnations. Letts also directed the series at various points, and returned to it 1980 as the executive producer for Baker's last season.

Born in Leicester, Letts became an assistant stage manager at the Theatre Royal in his early teens and took up the job full time upon leaving school. After six months, he began acting, earning £3 a week in repertory. His earliest screen role, as a Welsh seaman, came in Ealing Studios' San Demetrio, London (1943), a naval adventure. The cast were given a two-year contract with the studio, but it was deferred until after the second world war, during which Letts was a sub-lieutenant in the Royal Navy Coastal Forces.

After the war he began to appear on stage, TV and in film, with featured roles in Scott of the Antarctic (1948), The Cruel Sea (1952) and Reach for the Sky (1956). His TV debut came in Gunpowder Guy (1950), a one-off on BBC children's television. Patrick Troughton starred as Guy Fawkes, Letts was a fellow conspirator and it was broadcast live from Lime Grove, west London. Letts said his understanding of the demands placed on a producer stemmed from his appearances in early Sunday evening serials, such as The Black Arrow (1958) and the second world war drama The Silver Sword (1957).

Children's TV productions included The Gordon Honour (1956), which traced two feuding families down the ages, and The Man from the Moors (1955), as Charles Dickens. On Boxing Day 1954, he played the Prince of the Isles of Nowhere in The Three Princes, which writer-director Rex Tucker "invented ... from three lines in a book of Persian legends". The evil Prince of the Sun was Roger Delgado, another future colleague, and it was reproduced five years later to the day.

For older viewers, he played Lewis Carroll in Nom-de-Plume (1956), a series in which the identity of each episode's subject was revealed only at its end, and Colonel Herncastle in Wilkie Collins's The Moonstone (1959), again with Troughton. The mid-50s saw him telling 15-minute stories to camera that he had written, and by 1963 he was reading the Epilogue. He was the frontman of Second City Reports (Granada, 1964), a spoof documentary series that failed to catch on, despite having Michael Frayn among its writers and Eleanor Bron in the cast. Other guest appearances included The Avengers (1964).

By the early 1960s, Letts had begun writing episodes of series, including Dr Finlay's Casebook, and he took the BBC's directors' course in 1966. After his five years on Doctor Who, he directed The Prince and the Pauper (1976), with a young Nicholas Lyndhurst in the title roles. He took over producing the BBC's Sunday evening classic serial strand at short notice and remained there for a decade. On modest budgets and with limited location filming, his productions rated well and are fondly remembered. Alongside A Tale of Two Cities (1980) and Sense and Sensibility (1981), there were less frequently televised works such as Rudyard Kipling's Stalky & Co (1982) and Walter Scott's The Talisman (1981). Letts was greatly saddened when, having filmed the location scenes for The Old Curiosity Shop (1979), his friend Troughton suffered a heart attack and had to be replaced as Quilp.

Letts was a tutor on the BBC directors' course from 1987 to 1988, before directing episodes of Brookside and EastEnders. In 2007, he made an unexpected return to acting, as a professor in Channel 4's retelling of Exodus.

Swarthy in younger days, later growing a distinctive beard, he believed that if intelligent people are gathered together, "they will tend to be liberal/left of centre, because that is the most intelligent position to take". He won an Emmy and received several Bafta nominations for his classic serials. Always friendly and amenable, he contributed to many DVDs and documentaries about Doctor Who. His autobiography, Who and Me, is due to be published next month.

His wife, Muriel, died earlier this year. He is survived by his sons Dominic and Crispin, who are both actors, and his daughter, Joanna.

Toby Hadoke writes: On the verge of cancellation when he joined, Doctor Who was in much better shape when Letts eventually relinquished the producer's chair. His tenure involved dandy Jon Pertwee alongside stalwart characters Brigadier Lethbridge-Stewart (Nicholas Courtney) and The Master (Roger Delgado) – an enduring creation of Letts and his script editor Terrance Dicks (with whom he formed a lifelong friendship).

Letts's liberal worldview led him to commission stories with contemporary resonance – eco-parables, critiques on colonialism and apartheid, even entry into the Common Market (the Galactic Federation in Doctor Who parlance) were all presented within a format of child-friendly derring-do.

As a director, he was in charge of a number of memorable adventures. Terror of the Autons, featuring a killer plastic chair, a murderous telephone flex and lethal fake daffodils, prompted questions in the House regarding TV violence. Letts, a benign man who took his responsibilities seriously, never went that far again – Carnival of Monsters, a witty satire on the entertainment industry, with the Doctor an exhibit in an alien peepshow, went for belly laughs rather than bed-wetting.

He co-wrote Pertwee's swansong, Planet of the Spiders, with Robert Sloman, as well as The Daemons (satanic aliens in a cut-off village replete with murderous morris dancers), the story most fondly recalled by cast and crew from his era. In the 1990s he penned, and subsequently turned into novels, a couple of BBC Radio 2 serials for Pertwee's Doctor.

Proud of his association with Doctor Who, he was a regular fixture at conventions, even when recovering from chemotherapy. As recently as last month he was contributing to the DVD range of Doctor Who releases, his mind as sharp and his manners as intact as ever, even though he was physically frail.

•Barry Leopold Letts, actor, writer, producer and director, born 26 March 1925; died 9 October 2009