Oswald Gruebel resigned on Saturday as chief executive of troubled Swiss bank UBS, saying he took the blame for the $2.3 billion loss run up in alleged rogue trading in its investment banking division.

The bank, which said it would beef up risk controls under an accelerated restructuring of that part of its business, named its Europe, Middle East and Africa head Sergio Ermotti -- only at UBS since April -- to replace Gruebel on an interim basis.

Gruebel, appointed in 2009 to rebuild Switzerland's flagship bank after a near collapse, said in a message to staff that the trading loss announced last week had shocked him deeply.

I did not take the step of resigning lightly. I am convinced that it is in the best interests of UBS to approach the future with a new leader at the top, he said.

Gruebel, a 67-year-old banking veteran who helped turn around rival Credit Suisse last decade, was brought out of retirement to try to revamp UBS after it almost collapsed in 2008 under the weight of more than $50 billion lost on toxic assets.

UBS Chairman Kaspar Villiger said the board of directors, who met in Singapore this week, had not lost confidence in Gruebel despite the scandal and had tried to convince him to stay on to allow a more orderly succession next year.

Chris Wheeler, analyst at Mediobanca said he was very surprised the board had agreed to let Gruebel go given the restructuring already under way at the investment bank.

It certainly puts at risk what they were trying to achieve, given it's a recovery stock and it has had four CEOs now since 2007. It could see a lot of people capitulate on their hope for an early recovery for the stock, he said.

UBS shares fell more than 10 percent since the scandal broke on September 15, trading at their lowest level since shortly after Gruebel took over in early 2009, but they rose 4.8 percent on Friday on hopes the board would agree a major restructuring.

Ermotti, who Villiger said was a strong candidate to replace Gruebel permanently, told a conference call with journalists the bank would review its risk controls at group level, and an internal investigation of what went wrong at the investment bank should conclude in 10 to 14 days.

OPPORTUNITY OUT OF DISASTER

A 51 year-old from Switzerland's Italian-speaking region of Ticino, he was already being groomed as a possible successor since he joined UBS in April from UniCredit after he was passed over in a management reshuffle at the Italian bank following the departure of CEO Alessandro Profumo.

Villiger said he had no doubts about the future of investment bank head Carsten Kengeter, whose fate had also hung in the balance, saying he and his team had done an excellent job to limit losses from the unauthorized trades by quickly closing the positions.

He contrasted their actions with hesitation that caused Societe Generale to run up a 4.9 billion euros ($6.6 billion) loss on rogue trades by Jerome Kerviel three years ago that felled that bank's then-chairman and CEO Daniel Bouton.

Villiger declined to comment on whether Kengeter could still be a candidate to take over as CEO, saying only the board was looking at both internal and external candidates and should decide on a permanent replacement within six months.

Villiger, a former Swiss finance minister who also faced calls to resign over the scandal, said the bank was sticking to plans for former Bundesbank chief Axel Weber to join the board next year and take over as chairman in 2013, adding Weber would be involved in the choice of a new CEO.

He said he did not favor splitting off investment banking from the rest of the bank, but said the board wanted Ermotti to speed up an overhaul of the division to better align it with UBS's core business of managing wealthy clients' money.

We want to turn this disaster into an opportunity, he said.

Ermotti said more details of changes at the division, which would scale back but not exit its fixed income business and could see limited extra job cuts, would be revealed at an investor day already planned for November 17 in New York.

UBS had already said in August it would axe 3,500 more jobs to shave 2 billion Swiss francs off annual costs, with almost half from the investment bank, which had grown to almost 18,000 staff as Kengeter tried to rebuild the battered franchise.

'TURNAROUND' LEGACY

The alleged rogue trader, Kweku Adoboli, was sorry beyond words for what had happened and was appalled at the scale of the consequences of his disastrous miscalculations, his lawyer Patrick Gibb said at a court hearing in London on Thursday.

The 31-year old did not enter a plea and was remanded in custody until a further hearing next month.

Clients pulled nearly 400 billion Swiss francs ($442 billion) -- almost a fifth of client assets -- from UBS after the bank was battered in the financial crisis to post the biggest annual corporate loss in Swiss history and as it fourght

a prolonged dispute with the U.S. tax authorities.

Villiger said Gruebel had achieved an impressive turnaround and strengthened UBS fundamentally, but admitted that clients had been scared off by the rogue trading affair.

Gruebel, who had already foregone his bonus for the last two years, would get no severance package as he had resigned.

UBS's largest shareholder, Singapore sovereign wealth fund GIC, met the bank's management earlier in the week and in a rare statement expressed its disappointment. It demanded firm action to restore confidence and details of how the bank would tighten risk controls. It declined to comment on Gruebel's resignation.

GIC had not been consulted over Saturday's management change, Villiger said.

UBS's board meeting, one of four regular ones per year, took place in Singapore ahead of the UBS-sponsored Singapore Formula One motor racing Grand Prix on Sunday, when executives will be trying to reassure big clients.

Asked whether UBS might reconsider its Formula One sponsorship now motor racing fan Gruebel is gone, Ermotti, who flew back to Zurich overnight, said the deal was a long-term commitment so he could not review it even if he wanted to.

In 2007, former UBS CEO Peter Wuffli was ousted at a board meeting in Spain to coincide with the America's Cup yachting event there, in which UBS was sponsoring a team.

($1=0.906 Swiss francs=0.743 euros)

(Additional reporting by Steve Slater in London; Editing by John Stonestreet)