Updated

Stephen Hester reported his last set of results for bailed-out Royal Bank of Scotland Friday as he prepares to hand over the reins to New Zealander Ross McEwan.

The state-controlled bank recorded a first-half profit of 535 million pounds ($811 million), compared with a loss of 2.03 billion pounds in the same period of last year.

RBS on Friday named McEwan, a 56-year-old native of New Zealand, as CEO effective Oct. 1.

Hester, 52, became CEO in October 2008, after the government rescued the bank with a 45 billion-pound ($71 billion) capital injection. Fred Goodwin, Hester's predecessor, brought the bank to near-collapse after an aggressive global expansion, which included the ill-fated purchase of Dutch lender ABN Amro. RBS is currently 80 percent owned by the British taxpayer.

"RBS's journey from 'bust bank' to 'normal bank' is largely done," Hester said in a statement.

"But no small task remains — to harness the energies and strengths that have driven the bank's recovery, and to take RBS towards the target of being a 'really good bank' for customers, shareholders and society as a whole."

RBS's earnings failed to wow analysts waiting for the UK government to start selling off its stake. The bank also suffered from the timing of its results, coming just a day after Lloyds, another state-rescued bank, revealed buoyant earnings that put its recovery ahead of schedule.

But analysts say it's important that RBS has ended the uncertainty over who would replace Hester, who was widely admired for rising to the challenge of steering the institution through the mess left behind by Goodwin, aka "Fred The Shred." Hester's resignation in June had been a surprise, and critics wondered whether a banker of some stature could be found to lead the institution through the difficult years to come.

Hester is widely believed to have been pushed out of the top job at RBS amid a tense relationship with Treasury chief George Osborne. The government has been pushing for the banks to be returned to the private sector as soon as possible — or perhaps a least before it faces re-election in 2015.

McEwan, who heads the bank's retail division, will receive an annual salary of 1 million pounds and said he did not wish to be considered for an annual bonus this year or next. He also asked that any award for his work this year be deferred until 2017. Even then, taxpayers must gain value first

"We are a bank that millions of British families have entrusted with their finances," McEwan said in a statement. "We support more companies — from the very smallest to the very biggest — than any other bank in the UK.... It will be a privilege to lead a bank that matters to so many and I thank the board for their confidence in me."

Analysts Ian Gordon of Investec said that picking an RBS insider should help the process.

"We believe the importance extends well beyond Ross' own personal credentials," Gordon said. "It should signify a degree of strategic continuity and (we hope) help to head off the threat of fresh government-initiated value-destruction."