Harry Thompson, who has died of lung cancer aged 45, was one of the most successful television comedy producers of the last 20 years, delighting millions of viewers with such enduring hits as Have I Got News for You, They Think it's All Over and Never Mind the Buzzcocks. He was regarded within the industry as one of those rare, clever, creative producers who could make a key impact on a show - the difference between a hit and an also-ran - as when the first series of Channel 4's 11 O'Clock Show (1998), which he produced and helped write, spawned Ali G and later Da Ali G Show (2000).
Born in London, Thompson was the son of a marketing manager father who worked for the Guardian, and a teacher mother who campaigned for higher standards in education. From Highgate school, he went to Brasenose College, Oxford, where he edited the university newspaper, Cherwell: his arts editor was Roly Keating, now controller of BBC2.
In a well trodden path, Thompson joined the BBC as a trainee in 1981, and worked as a researcher on BBC2's Not the Nine O'Clock News, then Radio 4's The Mary Whitehouse Experience - launching the careers of Rob Newman and David Baddiel - and producing The News Quiz, already an established favourite. But he was a maverick, pushing boundaries with outrageous jokes, far too independent to flourish within a bureaucratic institution.
This was the point when independent producers realised that Radio 4 had a number of comedy shows and producers that could translate into fine television. When the production company Hat Trick decided to adapt The News Quiz in 1989, Jimmy Mulville, its managing director and series producer, called in Thompson. He produced the resulting Have I Got News for You for five years, some 93 episodes, choosing Angus Deayton as chairman and Ian Hislop, another Oxford contemporary and editor of Private Eye, as team captain, opposite the comedian Paul Merton. The show started quietly on BBC2, but by 2000 was such a mainstream hit that it transferred to BBC1. Repeats are now billed as comedy classics.
Thompson's waspish humour and fearlessness was evident. He invented the tub of lard, a visual joke after Roy Hattersley let the programme down once too often. He also devised the running joke that started when Jeffrey Archer was elevated to the peerage, of making sure that in the odd-one-out section, every "odd one" drew attention to the figure concerned. The programme was not sued.
Television professionals attest that panel games are the hardest format to get right, but Thompson showed he had that talent. In 1995, he took the knack into the field of sport with They Think it's All Over, and the following year moved on to pop and rock music with Never Mind the Buzzcocks.
With his drive and determination, he was not always easy to work with. He fell out with Hat Trick and then Tiger Aspect, before settling most productively at Talkback Thames, a trendy but supportive environment run by Peter Fincham, where he made one of his most distinctive shows, Monkey Dust (2003), a dark, satirical animation, for BBC2 and BBC3.
But Thompson was unfailingly generous to young writers and producers, many of whom developed successful careers. He left in June to co-found Silver River, a new independent, with Daisy Goodwin. His last television work was done last month from a bed in the Cromwell hospital, putting the finishing touches to his first sitcom, for Channel 5, called Respectable. It is set in a brothel.
Goodwin describes Thompson as "incorruptible", meaning that he always told the truth, saying what he thought, not what you might want to be told. Always a man with a lot of irons in the fire, he was finding fame as a fine writer, with biographies of Hergé (1991) - he was a huge fan of Tintin - Richard Ingrams (1994) and Peter Cook (1997). His novel, This Thing of Darkness, a historical fiction about Charles Darwin and Robert FitzRoy, the devoutly Christian captain of The Beagle, gained a place on this year's Booker longlist. A semi-autobiographical book about cricket, the great love of his life, is awaiting publication. He ran the Captain Scott team, and took great delight in following last summer's Ashes Tests.
He also loved travelling: just weeks before he was hospitalised he took a last holiday in the former Soviet republic of Georgia, because he had never been there. He had two children, Betty and Bill, by his first marriage, to Fiona Duff, and he is also survived by his longstanding companion, Lisa Whardock, whom he married just hours before he died.
Peter Fincham writes: Television is full of so-called mavericks, but Harry Thompson was the real thing. I first worked with him in the early 1990s on a pilot for London Weekend Television with Angus Deayton. Harry had been at Hat Trick Productions, where he had made Angus a star. Hat Trick and Harry were not a happy marriage though, and he turned up at Talkback, the company I ran. We hit it off immediately. He had a proposal for a comedy sports quiz which subsequently became They Think it's all Over. Harry produced it brilliantly.
As a colleague, he was bloody-minded, funny, challenging, contrary, maddening and entertaining. He did things entirely his own way. His outlook was that of an unreconstructed Private Eye reader. It was as if he had formed his world view at an early age and was damned if he was going to make any revisions. I once went to a dinner at his flat in Bayswater; it was like visiting an Oxbridge undergraduate's rooms. Fittingly, the satirist John Wells was there.
Harry's starting position was that broadcasters were fools who didn't know what they were talking about - and, on occasion, he was right. At key meetings he would say the wrong thing, or turn up late, or leave early, sometimes to play five-a-side football. It didn't matter, because he delivered. He had one or two eccentricities, such as carrying an umbrella in sunny weather. He could be brash and over-confident, but there were other sides to his character which his television colleagues rarely saw.
His biography of Peter Cook is a model of balance and sensitivity; despite writing as an obvious fan, Harry perfectly captures the contradictions of Cook and writes sympathetically and with real awareness about his personal relationships. His novel, This Thing of Darkness, is a revelation.
He kept his sense of humour to the end. When his novel made it to the Booker longlist, he was as surprised as anyone: it had only received one national review, and he took mischievous delight in the idea that other Booker nominees would curse his publicity-friendly illness. Sadly, he did not make it to the shortlist. He won't make it to the British comedy awards, either, where they are planning to give him a special award. His most recent work, such as his extraordinary animated BBC3 series Monkey Dust, was among his best.
I last saw Harry a couple of weeks ago, and it was clear that his fight against cancer was proving tough. He showed no self-pity, though. He wasn't sentimental by nature, and would not encourage showy demonstrations of grief from colleagues. But he would like to know that they valued his friendship, and will miss him. They did, and they will. He was a singular, and memorable, individual.
David Baddiel writes: I don't know what people who are not in the television industry imagine a producer does. The truth is a lot of it is fairly mundane, or at least non-creative - controlling a budget, calming down broadcasters, making sure actors have transport to rehearsals and so on. In those terms, Harry Thompson was not a brilliant producer. As a person, he was rather louche, and wouldn't have struck you as especially organised. However, he did have something that the vast majority of the more administratively capable producers don't have: a real gold-standard sense of humour.
More than any other producer since John Lloyd (the producer of Not the Nine O'Clock News and Blackadder), Harry had his finger on the pulse of comedy; he was really plugged into, if you'll excuse the word, the zeitgest of comedy. He had a proper instinct for when someone or something was funny - an increasingly rare trait at the managerial level in television, where most people tend now to have only an instinct for whether or not someone or something is similar to a previous hit.
This spring I went into Talkback Productions to see Peter Fincham about a TV version of my Radio 4 show, Heresy, a discussion programme which tries to challenge received opinion. Within five minutes we had decided that the obvious producer was Harry, who then appeared, as ever, 15 minutes late.
Sadly, two weeks later, I heard he had cancer. He was in his own way one of the broadcasting world's great heretics, and that world is duller, more predictable, and less maverick without him.
· Harry Thompson, television producer, scriptwriter and novelist, born February 6 1960; died November 7 2005