LONDON — Royal Bank of Scotland swung to a profit in the second quarter as the taxpayer-owned lender reduced charges for past misdeeds.

RBS, bailed out by the British government during the 2008 financial crisis, said Friday that net income totaled 680 million pounds ($894 million) after a loss of 1.08 billion pounds in the same period last year.

Adjusted operating profit, which excludes litigation and restructuring costs, more than doubled to 1.69 billion pounds as RBS increased lending, cut spending and reduced the amount of money it set aside for bad loans.

“We see the first six months of this year as proof of the investment case for this bank: our path to sustainable profitability is becoming clearer and closer and we have resolved some of the most significant issues this bank faced,” CEO Ross McEwan said in a statement.

RBS also said its NatWest Markets unit has carried out contingency planning for Britain’s looming departure from the European Union by ensuring that the bank’s license in the Netherlands is valid.

Depending on the outcome of Britain’s negotiations with the EU, the bank may need a beachhead in Europe to continue operations on the continent.