Royal Bank of Scotland wrote off another £780 million for past misconduct today and suggested more pain was to come before taxpayers would see a return on their £46 billion bail-out of the lender.

The bank indicated that despite reporting a third quarter in a row of profits for the first time since it nearly collapsed in the financial crisis, further work was needed to reshape the group before it could return to private hands or start paying a dividend.

Meanwhile RBS, which includes NatWest and Ulster Bank, indicated the pace of branch closures - with 102 shut so far this year - was unlikely to slow with customers increasingly opting to do their banking online.

RBS set aside £400 million to settle claims of foreign exchange (forex) rate rigging - the latest institution to do so amid global investigations into the scandal that are reportedly expected to announce findings by the end of the year.

The bank, which is 80% owned by the taxpayer, also added £100 million to its compensation bill for the mis-selling of payment protection insurance (PPI), taking the total so far to £3.3 billion.

Further sums included £100 million in regulatory provisions which include a coming settlement with the Financial Conduct Authority (FCA) over a 2012 IT failure. There were also litigation costs as RBS faces a series of lawsuits in the US.

Chief executive Ross McEwan indicated further charges "in the post" would include costs over alleged mis-selling of mortgage-backed securities in the US.

Mr McEwan added: "We know we still have a long list of conduct and litigation issues to deal with and much, much more to do to restore our customers' trust in us."

RBS reported pre-tax profits of £1.27 billion for the third quarter, up from a £634 million loss in the same period last year and also an improvement on £1.01 billion in the second quarter.

It was helped by the improved economic climate which meant toxic loans hived off into its so-called "bad bank" and other assets in Ulster Bank did better than expected, bumping up the bottom line by £800 million.

Gross new mortgage lending totalled £5.3 billion while gross lending to small and medium enterprises (SMEs) was £2.6 billion in the quarter, up 24% from the same period in the previous year.

RBS said its corporate and institutional banking division "had a weak quarter" as it was hit by the conduct charges as well as lower income but personal and business banking increased operating profit by 3% to £499 million.

Mr McEwan said: "We are delighted with the third quarter of profits, demonstrating that our strategy is starting to deliver good results."

He added the UK economy was in "pretty good shape" though growth was expected to drop next year and the housing market was easing.

Mr McEwan made clear that the timing of any sale of the taxpayers' stake in the bank, rescued during the financial crisis, was a matter for the Government.

But he added: "We have still got to make this a smaller, sharper business that's simpler for customers, so that is our focus."

Finance director Ewen Stevenson said there was still "a lot more work to do" before the resumption of shareholder pay-outs while Mr McEwan said the bank was still building up its capital position and there were "bumps in the road" ahead.

He added that the group was "doing pretty well" on the rise to 3.9% of its leverage ratio - a key financial stability indicator showing the capital a bank holds as a percentage of loans - ahead of new rules being announced by the Bank of England.

Mr McEwan would not give any figures about branch closure plans - days after Lloyds said it was shutting 200.

But he said: "We have made no bones about the inevitability of branch closures as more and more customers use digital to do day-to-day banking."

Britain's Financial Conduct Authority (FCA) and Serious Fraud Office (SFO) and the US Department of Justice, and other US authorities, are investigating RBS over the forex claims that are the latest scandal to hit global banks.

RBS is reviewing message exchanges relating to forex trading and Mr McEwan said "those people responsible need to be accountable".

He added: "No one should be in any doubt about the seriousness with which I take these issues. We want to get these settled as quickly as we possibly can so we can concentrate on our core franchises."

The announcement on forex comes a day after rival Barclays said it was making a £500 million provision as it finalises talks with global regulators over the scandal.

RBS and Barclays are among six banks reportedly in discussions to reach a settlement on the affair before the end of the year. The others are HSBC, Citigroup, JP Morgan Chase and UBS.

In recent days, Switzerland's UBS has set aside 1.8 billion Swiss francs (£1.2 billion) and America's Citigroup has taken a 600 million US dollar (£375 million) hit to cover regulatory and litigation issues.

A fine for RBS for forex rigging would come after it last year paid £391 million to US and UK regulators for rigging the benchmark interbank lending rate, Libor. It also had to pay £325 million to European regulators for similar allegations.

The Libor scandal has resulted in billions of pounds in fines for banks around the world but FCA chief executive Martin Wheatley has said the forex allegations are "every bit as bad".