LONDON (Reuters) - Higher misconduct costs and restructuring charges led to a third quarter loss at Royal Bank of Scotland (>> Royal Bank of Scotland Group plc), casting fresh doubts on when the government will recoup its 2008 bailout cash.

The Edinburgh-based bank, which is still more than 70 percent owned by the British taxpayer, reported a loss attributable to shareholders of 469 million pounds, compared with a profit of 940 million pounds, boosted by the sale of U.S. unit Citizens, in the same period last year.

Friday's loss was more than twice the 231 million pounds estimated by analysts, according to a poll supplied by the bank.

In a further sign of the many problems still facing Chief Executive Ross McEwan, RBS also said it would miss an end-2017 deadline to sell its Williams & Glyn branch network, which was a condition of its 2008 state rescue.

The bank's seven-year struggle to sell the unit accounted for 301 million pounds of a 469 million pounds restructuring charge booked during the quarter, it said.

McEwan is in the midst of a vast, multi-year restructuring of RBS, which includes asset sales, job cuts and multi-billion dollar charges to settle litigation and pay fines for regulatory breaches.

"We've said that 2015 and 2016 would be noisy as we work through legacy issues and transform this bank for customers. These results reflect that noise," McEwan said in a statement.

LOSSES

The losses were partly driven by a fresh 425 million pound misconduct charge and an 82 percent year-on-year rise in third quarter impaired loans to 144 million pounds.

Investors cheered higher-than-expected total income of 3.3 billion pounds, as RBS stepped up mortgage and business loans to maintain its status as Britain's biggest corporate lender.

Shares opened more than 3 percent higher on Friday but lost much of their early gains to trade flat at 0818 GMT.

But while the near-term performance impressed some, others were less optimistic for the future.

"While the results themselves were better than expected, guidance on the outlook is more disappointing," said Gary Greenwood, an analyst at Shore Capital.

RBS more than tripled the sum set aside to cover legal costs as it edges closer to a 4 billion pound lawsuit brought by investors who claim they were misled into supporting a cash call just months before its near-collapse in 2008.

The bank is also waiting for what is likely to be the biggest regulatory penalty in its history for its role in mis-selling U.S. mortgage bonds.

It said it continues to cooperate with the U.S. Department of Justice, but gave no guidance on the timing of a settlement.RBS also made no provision to cover claims its Global Restructuring Group (GRG) deliberately bankrupted small businesses to acquire their assets cheaply in the mid-2000s as several customer lawsuits loom.RGL Management, which is leading a group action against RBS in 2017, said RBS was "not making adequate provisions to meet pending legal challenges".

RBS, which succumbed to a 45.5 billion-pound state bailout during the 2007-09 financial crisis, has not made an annual profit since 2007. The government is sitting on a 25 billion pound-plus loss on its investment.

(Editing by Sinead Cruise and Alexander Smith)

By Andrew MacAskill and Lawrence White