Image caption The government still has an 81% stake in RBS

Royal Bank of Scotland has confirmed it will repay next week the last of the £163bn in emergency loans it received from the US and UK governments.

The announcement came with its first quarter results. It reported a pre-tax loss of £1.4bn, compared with a loss of £116m in the same period last year.

Much of the loss came from changes in the valuation of RBS's debt. It made an operating profit of £1.2bn.

RBS has also set aside an extra £125m to cover claims for PPI mis-selling.

It means the bank will have set aside a total of £1.2bn for payment protection insurance compensation.

Earlier in the week Lloyds Banking Group set aside an extra £375m, while Barclays made an extra £300m provision last week.

RBS has also announced that it will resume paying dividends on preference shares, which were suspended for two years under state aid rules.

RBS is still a hugely long way from being in a position where taxpayers could realistically hope to avoid a massive loss on the £45.5bn of equity capital they injected into RBS during the crisis RBS on the mend - again

It is not yet paying dividends on its ordinary shares.

The bank said impairments for bad debts were £1.3bn, down 33% from the same period last year.

"The start of 2012 has shown pleasing progress at RBS within the context of a flat economic environment," said RBS chief executive Stephen Hester.

He said that RBS had two jobs: removing past mistakes and improving the new RBS.

He added that repaying emergency loans and resuming dividend payments were important milestones for the first job.

Lloyds said earlier in the week that it should have repaid all of its emergency loans by the end of the year.

Having the emergency loans repaid by RBS will not mean taxpayers have made all their money back as the government still owns an 81% stake in the bank, for which it paid £45.5bn.

The Treasury bought the shares at an average price of 50 pence each, which is double the current value.