LONDON (Reuters) - Royal Bank of Scotland (>> Royal Bank of Scotland Group) raised income and cut costs in the third quarter to deliver a forecast-beating operating profit which lifted shares in the state-owned bank on Friday.

RBS said operating profit was 871 million pounds in the quarter, beating analysts' expectations as it grew income by 6 percent from the same period a year ago.

Saved by a 45.5 billion pound government bailout during the 2008 financial crisis, RBS reported its third consecutive quarter of profitability as it emerges from restructuring but still forecasts an overall loss this year.

Analysts have said an expected settlement with the U.S. Department of Justice over its alleged mis-selling of mortgage-backed securities during the financial crisis could be as much as 12 billion pounds, and RBS has already set aside more than half of that figure as a provision for it.

Chief Executive Ross McEwan told reporters that while there had been no "substantial discussions" with or opening offer from the DOJ, the bank remained hopeful it would reach a settlement this year.

"There are only a couple of banks outstanding now and we do believe that time will come... We remain optimistic on that."

Settling the case is seen by investors and analysts as a prerequisite for the British government to sell its 71 percent stake in the bank, and for RBS to resume paying dividends.

Friday's results were the first time that RBS had achieved three consecutive quarters of profit since 2014, McEwan said, adding that the bank is on track to hit its financial targets, which include a return to profit in 2018 after more than a decade of losses.

RBS reduced costs by 708 million pounds over the year to date, putting it on track to hit its target of 750 million pounds of cuts for the year.

The bank's shares were up 2.2 percent at 0746 GMT.

But Neil Wilson, senior market analyst at ETX Capital, warned this might not last if any of the bank's legacy conduct issues derail its progress.

"Shares have risen 60% in the last year as RBS has begun to show profits, but if investors get a whiff that profits are not coming next year they may lose patience," he said.

RBS also faces the possibility of further action from Britain's financial watchdog over the treatment of small businesses in its Global Restructuring Group (GRG) during and after the financial crisis.

The Financial Conduct Authority on Monday published a detailed summary of a report into the unit, after customers alleged GRG pushed ailing firms into bankruptcy to pick up their assets on the cheap.

The report outlined numerous failings and the FCA said it was investigating further, raising the possibility of action over an issue McEwan had hoped to settle via a 400 million pound compensation scheme.

RBS's investment banking unit Natwest Markets saw only a modest decline in income, representing a good performance in tough market conditions that saw rivals such as Barclays (>> Barclays) report tumbling trading revenues.

($1 = 0.7621 pounds)

(Reporting by Emma Rumney and Lawrence White; Editing by Rachel Armstrong and Alexander Smith)

By Emma Rumney and Lawrence White

Stocks treated in this article : Barclays, Royal Bank of Scotland Group