The civil servant responsible for examining Scotland's public sector finances has launched a probe into possible shortfalls in funding set aside for the restoration of disused opencast mine sites.

Auditor General Caroline ­Gardner has been called in by the Scottish Green Party to examine whether councils have set aside enough money to cover the huge potential costs of cleaning up the sites to make them safe for other uses.

Although mining firms contribute towards the costs, The Greens said East Ayrshire is facing a potential £28 million shortfall in the funds available for the £161m cost of restoring sites in the area.

The party's co-convenor Patrick Harvie said the funding gap has been made worse by this collapse of Scottish Coal this year.

Ms Gardner's intervention could result in local authorities being compelled to include details of cash set aside by mining firms to cover the cost of restoring former opencast sites in their annual accounts.

Mr Harvie said: "It appears almost every mine has a different arrangement for how the costs of restoration were to be met. Local authority governance of these arrangements has also differed greatly in diligence and success.

"The local communities who live next to opencast mines are likely to be left with a scarred landscape and broken promises. Local authorities and the Scottish Government face picking up the tab.

"Unless a financial and governance model that guarantees restoration monies will be available at the end of a project's lifetime it is likely more communities will be blighted and there will be further demands on the public purse."

There are growing concerns over the long-term clear-up costs emerging across the country, with opencasts in operation in Ayrshire, Lanarkshire, Fife, the Lothians and Dumfries and Galloway.

Operator Hargreaves, which recently took control of Scottish Coal, said it would guarantee it would restore the Cauldhall site in Midlothian for which it gained planning permission after it finishes extracting coal in 10 years.

It also said it would complete the restoration of the nearby Shewington Surface Mine which was left unfinished following the liquidation of Scottish Coal.

Durham-based Hargreaves claim that Cauldhall, which opponents claim would be a blight on the landscape, could create more than 300 jobs and bring in millions of pounds for the area's economy.

But Mr Harvie said councils are sitting on a financial timebomb with the taxpayer most likely to be meeting the bill because cost estimates are wildly inaccurate.

He welcomed Ms Gardner's investigation. In a letter to the MSP, she said that restoration shortfalls had ben recognised "as substantial issue".

She said: "We have asked ­auditors to undertake some initial fact finding on the extent of the potential issues for the public sector and how these are currently being accounted for and built into financial plans."

She said further audit work "could, for example, feature as part of the next year's annual audit in individual councils or as part of our future programme of national performance audits".