(Reuters) - Royal Bank of Scotland said it had set aside 400 million pounds to cover potential fines for manipulating currency markets and another 100 million to compensate customers mis-sold loan insurance.

RBS is one of six banks in talks with Britain's financial regulator to settle allegations its staff were involved in the rigging of the global $5 trillion-a-day currency market.

Rival Barclays said on Thursday that it had set aside 500 million pounds to cover potential FX fines. JP Morgan, UBS and Citi have also set aside large sums.

RBS, which is 80 percent-owned by the British government, said it made a third quarter pretax profit of 1.27 billion pounds, compared with a loss of 634 million the year before. That was ahead of the average analyst forecast of 1.1 billion, which was compiled by the bank.

The economic revival in Britain and Ireland has enabled RBS to recover debts that it had previously written off. The bank had a net release of 801 million pounds during the quarter, ahead of an average analyst forecast of 590 million.

RBS also said it plans to keep its Ulster Bank business, following an upturn in the Irish economy.

"We have a good market position and believe that, with investment, Ulster Bank can deliver attractive shareholder returns in the future," said Chief Executive Ross McEwan.