By Torin Douglas
BBC media correspondent
When Lorraine Heggessey took over as controller of BBC One, four and a half years ago, the job was seen as a poisoned chalice.
Its ratings were declining and its budget hadn't kept pace with those of its advertising-funded rivals. But she wasn't daunted and vowed to reverse the trend.
On the day she was appointed, she was asked if she'd like to overtake ITV in the ratings?
Lorraine Heggessey was promoted to controller in 2000
Many BBC executives would have ducked the question, but not Heggessey, a feisty former Panorama producer who had doorstepped crooks and conmen. "Of course," she said.
Remarkably, she succeeded. With the backing of the then BBC director-general Greg Dyke and a substantial increase in the licence fee - not to mention the decision to move the news from 9pm to 10pm - Heggessey made BBC One Britain's most popular channel.
But however much it cheered up BBC programme-makers and bosses, many felt it wasn't an astute political move for a publicly-funded organisation like the BBC.
BBC One needs to be popular, because every household pays the television licence fee and the flagship channel must keep their loyalty.
But should it really be more popular than ITV1, an overtly commercial channel that lives by its ratings to attract advertisers?
Heggessey's BBC One proved popular in the TV ratings
Commercial broadcasters - particularly ITV, smarting from a slump in its advertising revenue - went on the attack, accusing BBC One of forsaking its public-service credentials in a chase for ratings.
Where were the arts and current affairs programmes, they asked?
Where were the religious series and documentaries?
The head of the commercial television regulator commented sharply: "Beating ITV with Blue Planet is a triumph! Beating it with Celebrity Sleepover is a tragedy!"
Controllers of BBC One are damned if they win audiences, and damned if they don't.
With increased budgets, Heggessey revived the BBC's popular drama and entertainment output - but many felt there were too many makeover and lifestyle shows.
So what is her legacy?
As well as its strong ratings position, she points to critically-acclaimed drama series such as Spooks, Blackpool, State of Play and The Lost Prince, as well as factually-based one-offs such as Dirty War and England Expects.
In the arts, she strongly defends Rolf on Art, which won many critics round after initially being derided, and also points to Imagine, the serious arts strand presented by Alan Yentob.
Investigative programmes such as The Secret Policeman, which uncovered racism in the police, have won awards, and there've been major factual programmes such as Blue Planet and Pompeii: The Last Day.
In entertainment, Strictly Come Dancing proved a popular and critical success, and she's proud of programmes that have cut across genres such as Test The Nation.
And yet, as the BBC governors pointed out in last year's annual report, there has been a drop in people's perception of programme quality on BBC television.
That is a problem as the BBC awaits the renewal of its Charter and a new licence-fee settlement. The governors have ordered an inquiry into whether BBC One has the right balance between public-service and popular programmes in peaktime.
That in turn could colour the decision on her successor, who will have to lead the channel at what by any measure is a critical time.
Candidates can expect great weight to be placed on their public-service credentials.
This could favour Jane Tranter, the BBC's head of drama, responsible for acclaimed productions such as State of Play, Blackpool, The Lost Prince and Spooks.
But controllers of BBC One traditionally have a background in factual programming.
Other names being mentioned include Alison Sharman, who runs the BBC's daytime output, two BBC entertainment executives, Jane Lush and Wayne Garvie, and - from outside the BBC - Channel 4's director of programmes, Kevin Lygo.
Whoever takes over will find that Lorraine Heggessey - despite the brickbats - is a very hard act to follow.