BACK in the distant days of early 2009, when the world economy had exploded and Stephen Hester was trying to explain how he would put RBS back together, he gave an unusually candid assessment of his prospects during a newspaper interview.

"Jobs like this are unbelievably stressful, leaving you open to unpleasant scrutiny," he said. "There is a 50% chance it ends in tears-"

How right he turned out to be. The RBS chief executive might not exactly be sobbing into his Kleenex this weekend following his shock departure announcement from the bank last week with a £5.6m pay-off, but this will not be the ending he had in mind.

It leaves the bank leaderless, only barely back in the black, and still not lending sufficiently, whatever the new billboards claim about RB-Yes. It remains some distance from recouping the taxpayer's £45 billion bail-out of 2008-9, and is a good £1bn further away than a week ago thanks to the hasty sell-off of shares by unsettled traders.

Neither did Hester choose the timing. He is going by "mutual agreement" with the board and the government. It might not quite be a "drive-by shooting" to rival the fate of his predecessor Fred Goodwin, but it is hard to deny that the Chancellor has placed a big bet on the bank's future. If RBS starts going backwards once Hester departs at the end of the year, the consequences could be ugly for the UK economy, not to mention the Government's prospects at the next election.

Hester's involvement with RBS dates back to August 2008, when he was originally brought in as a non-executive director. This was some months after the bank's disastrous ABN Amro deal, but just before the Lehman Brothers collapse that made Goodwin's demise inevitable.

Hester was then still chief executive of property group British Land. A career banker who had made his name deputising Luqman Arnold's turnaround of Abbey National a few years earlier, he had already become a corporate troubleshooter for the then Labour Government by being appointed deputy chairman of Northern Rock after its nationalisation earlier that year.

He was drafted on to the RBS board along with fellow banking heavyweights John McFarlane and Arthur Ryan in response to the shareholder criticism that the bank contained too few specialists to constrain Goodwin's excesses. Hester only accepted the chief executive's job two months later – walking away from Northern Rock in the process – once the government had become the bank's top shareholder in the wake of its first rescue.

He was seen as a breath of fresh air after the autocratic Goodwin, styling himself as a listening boss who would bring out the best in people. Where Goodwin had loathed the media, the new chief executive set about establishing good relations; for example, taking time to visit The Herald's headquarters in Glasgow within weeks of his appointment (and returning once since).

As the weeks went by, however, it became clear he had signed up for the mother of all clean-up jobs. The bank had lost more than £24bn in 2008, the worst in corporate history, much of it from grossly overpaying for ABN Amro and taking bad bets in the investment market.

By March of 2009, full-scale market panic forced the government into a second rescue on the rationale that this engine of the UK economy could not be allowed to burn out. City men of Hester's generation might have regarded state ownership of enterprises as heresy, but the government's 83% (now 81%) stake in RBS had suddenly turned him into a glorified civil servant.

With £300bn of bad loans on his hands, Hester was now going to have to shrink a £2.2 trillion balance sheet that was considerably bigger than the British economy at a time when valuations for almost everything were severely depressed.

The Labour Government was very clear that it would take a hands-off approach and let the bank continue to act as a private entity. It is not clear to what extent Hester believed that, but like many commentators at the time, he certainly seemed to underestimate the difficulty of the road ahead.

He spoke about a five-year turnaround, at the end of which RBS would be ready to return to full private ownership. He made all the right noises about refocusing on the UK heartland, but still appeared to believe that the bank could continue to be a substantial global player.

Then came reality. The eurozone crisis, the UK Government's austerity programme and the regulatory pressure on banks to raise their capital and liquidity buffers all pushed any hope of recovery further into the future.

The multi-billion-pound losses at the bank kept coming. There were continual write-downs to the loan book aggravated by internal disasters like the payment protection insurance mis-selling scandal (costing nearly £2bn), LIBOR fixing (£390m in fines and much more in lawsuits possibly to come) and a severe IT failure (£175m to fix).

Hester became a kind of lightning rod for public anger about bankers, despite the fact that he will have foregone his annual bonus in four years out of five by the end of this year. It has surely not helped that he has made it known he has felt unreasonably treated and has stoutly defended many of the bonuses of his RBS investment-bank colleagues.

More generally he has come under mounting political pressure from the Coalition to perform the near-impossible trick of increasing lending while meeting the tougher regulatory requirements, and to get the bank in shape for some kind privatisation ahead of the 2015 election.

Having reduced the balance sheet by around £1.1tn, including cutting nearly 65,000 or a third of staff, the mood music had nevertheless appeared to be getting more melodic lately. Hester and chairman Philip Hampton have been saying for months that the bank was relatively close to normality, while the most recent trading quarter produced the bank's first profit in 18 months.

The departure announcement does not necessarily contradict any of that, but it has certainly drawn attention to the struggles behind the scenes.

Hester himself called his experience at the bank "bruising and difficult," while Osborne and Business Secretary Vince Cable both appeared to hint last week that Hester had not done enough to get lending moving or to help the economy.

There has been much said about the battles Hester fought to resist government interference over everything from the sale of US arm Citizens and more of the investment banking division, to the manner of a future privatisation.

He has lost the arguments over the first two issues, while it remains to be seen what will happen about the last. Hester is said to have resisted calls from the likes of outgoing Bank of England Governor Mervyn King to hive off the rump of the bank's toxic debt into a 'bad bank'.

This would make a quicker privatisation easier, but would be technically complex, possibly illegal under EU law, and would cost the country another estimated £8bn or £9bn to add to the £45bn bailout bill.

It was unclear going into the weekend what the Banking Commission's imminent report into the sector would have to say on the matter, but it looks as though the prospect of more state funding has put the Government off the idea.

Osborne may clarify his thoughts during Wednesday's Mansion House speech, although previous speculation that he might take the opportunity to start the RBS and Lloyds privatisations has ebbed away in recent days. David Cameron appeared to play down any prospect of an early sell-off on Friday, stressing the importance of taxpayers getting their money back.

At present the public stake is worth about £18.5bn less than what was paid, and Cameron certainly looks wary of jeopardising the original investment. This is despite some voices that argue the contrary, including Colin McLean of Edinburgh-based SVM Asset Management: "The present government doesn't have to defend the original price paid. I still believe the 'bad bank' element will end up being bailed out by the taxpayer as well."

The balance of opinion last week was that Hester did a good job under the circumstances, though the government may well take a different view. There is much more argument about what happens next, with possible replacements being touted including Citizens head Bruce Van Saun, finance director Nathan Bostock and Standard Chartered finance director Richard Meddings.

On how the successor will fare, the analyst research notes published after the announcement range from "buy" to "sell" recommendations for the bank's shares.

Investec said the government's continual interference with the bank had repeatedly made a bad situation worse, and that the inconsistency and mismanagement had hurt shareholder value. Deutsche Bank concluded that there were no signs of improved trading and that privatisation was off the short-term agenda, saying that RBS is already 32% over-valued compared to rival Barclays and was not therefore a good investment.

On the other hand, Jeffries predicted a substantial uptick in both RBS and Lloyds as the economy keeps improving, which would benefit their funding costs.

Jeffries analyst Joseph Dickerson told the Sunday Herald that Hester's departure "doesn't really impact the RBS recovery story. It is reaching the end of repair mode and it makes sense to have some new blood there.

"Hester was very popular with investors. [Last week's] share sell-off is a natural reaction, but in the intermediate term, despite the fact that people are somewhat surprised by the timing of the departure, it's actually a positive signal."

Independent analyst Louise Cooper said Hester had been "brilliant". She said: "He has reduced the balance sheet by around £1.1 trillion in four years, which is extraordinary. And he did it with no help from the economy. You could argue that it's not ready for privatisation because there's not been much economic growth. You could blame the Government for that.

"I do think they have made a mistake in getting rid of him. The way they have done it means they will have difficulty getting anyone of any calibre to do the job."

Having said that, Cooper believes that an improving economy will help his successor to pull the bank through.

Deutsche Bank was among those sounding much more doubtful, pointing to the fact that if a new successor starts at the beginning of 2014, it would be the middle of the year before anyone had a clear idea of the new strategy.

This is the nature of the beast for George Osborne, who is apparently determined that the next RBS incumbent makes more credit available to the country. Many observers have drawn a link between the closeness in timing of Hester's departure announcement and the Chancellor's Mansion House speech. All eyes will be watching for indications of how the Government wants the bank to develop from here.