Royal Bank of Scotland (RBS) has reported a bottom-line profit for the first time in a decade, but warned that a pending settlement with the US Department of Justice could hit 2018 results.

The lender swung out of the red to report a £752 million profit for 2017, marking a major improvement on the £6.95 billion loss which the lender reported a year ago – one of the biggest since its Government bailout in 2008.

Analysts had been pencilling in a full-year attributable loss of £592 million for 2017.

Friday’s figures take into account conduct and litigation costs of £1.29 billion, including £175 million in provisions to cover costs surrounding mis-selling of payment protection insurance (PPI).

Those costs will also deal with claims that it mis-sold mortgage-backed securities in the run-up to the financial crisis.

However, the lender, which is 72% owned by the taxpayer, has yet to reach what is expected to be a multibillion-dollar settlement with the US Department of Justice (DOJ) over those mortgage-backed securities sales.

Chief executive Ross McEwan told reporters on Friday that the figures for 2018 are likely to hinge on a decision by the DOJ – the timing of which the bank stressed “is not in our control”.

“Our results in 2018 are somewhat dependent upon the settlement with the DOJ, which we hope will happen,” Mr McEwan said.

“When it does come, you know, it will have a major impact on our numbers depending its size. But if you have a look at the underlying profitability of this bank, it is very good.”

However, it was not enough to bolster shares, which fell as much as 4.5%.

RBS has charged ahead with its cost-cutting drive and restructuring plan, having cut expenses by £810 million last year – exceeding its £750 million target.

Mr McEwan said the bank will see a rise in restructuring costs – totalling around £2.5 billion across 2018 and 2019 – and will increase its focus on digitalisation.

However, the RBS boss would not give clues over what this would mean for branch closures or jobs cuts.

He said: “One the issue of digitalisation, you’ll recall in the last four to five years I’ve never given what the impact on our headcount (is). I have the conversations with our staff before I tell any media about that and I’m not changing this year.

“But you know we are digitalising the bank, that is what is happening globally in financial services.”

In its UK personal and business banking division alone, RBS reported an 8% drop in headcount in 2017, while its commercial banking unit saw front office headcount fall around 16%, alongside an 11% drop in its private banking business.

Its annual report, published alongside the results, showed that Mr McEwan’s total pay package fell to £3.49 million from £3.7 million in 2016 following a decrease in his benefits and long-term incentives.

The bank’s remuneration committee said it was continuing a “restrained approach to executive pay” and had adjusted long-term incentives to reflect areas where the bank did not meet targets, such as total shareholder returns.

RBS’s bonus pool fell £1 million to £342 million for 2017.

RBS said its commercial banking division took a £187 million impairment charge from the construction sector, around £35 million of which was booked in the fourth quarter.

It is understood to account for the collapse of outsourcing giant Carillion – though the bank would not confirm the names of the respective business clients.

Its Carillion hit adds to the charges taken across the sector after a raft of British banks were exposed to the outsourcer through unpaid loans, with Barclays revealing a £127 million hit in the fourth quarter, and Santander having booked £203 million in impairment losses which were primarily made up of loans to Carillion gone bad.