The UK tax authority is seeking to recoup more than £4million from the body that scrutinises the spending of Scottish public authorities.

In a parallel with Rangers FC's recent dispute with HM Revenue and Customs (HMRC), Audit Scotland is engaged in a big tax case and a small tax case with HMRC.

HMRC is seeking to recoup £4.1 million of VAT rebates which it believes were wrongly paid to Audit Scotland since 2006, who are understood to have recouped the tax incurred by external companies that it contracted in to do audit work.

It will also hit Audit Scotland with interest and penalties for a second VAT debt of about £160,000, liable on income earned by contracting out its own staff to other public bodies.

The debt could have a knock-on effect for local authorities, which could see their fees for audit work increased by around 5%.

The full extent of the debt was revealed at a meeting of the Scottish Commission for Public Audit (SCPA) at Holyrood.

Auditor General for Scotland Caroline Gardner said: "There are two VAT issues under discussion between us and HMRC.

"The first relates to registration of Audit Scotland for business activities, which has been a matter of discussion over the last couple of years.

"That contingent liability of £160,000 is now crystallising. That issue is now closed down, and we are waiting for confirmation of the charges that HMRC may apply within the £160,000."

Assistant Auditor General Russell Frith said: "They have not yet come back to us with the amount that they are going to require."

An HMRC spokesman said: "For legal reasons, HMRC cannot comment on the affairs of individual businesses."