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 today.
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 and we are pleased to say that that issue is now closed down, and we are simply 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.
"We would not expect the penalties to exceed around 15% and we have covered that within the provisions that we have already made."
Ms Gardner continued: "Unfortunately, however, HMRC have now raised a new issue that relates to the tax status of the Accounts Commission.
"When Audit Scotland was formed in 2000 it merged the former Accounts Commission for Scotland with the National Audit Office's activities in Scotland to form the new body.
"Before the merger the Accounts Commission had what is called Section 33 status, which enabled it to reclaim input tax on the audit fees charged to local government.
"We discussed with HMRC's predecessor body about continuing that status, since the Accounts Commissions responsibilities were unchanged."
Since 2006 Audit Scotland has been recovering the VAT on behalf of the Accounts Commission, but HMRC have now challenged this arrangement and suggested that tax recovered during that period should be repaid.
Ms Gardner said: "The scale of the past liability is more than £4 million. The amount we have reclaimed over that period is between £400,000 and £500,000 a year.
"We have just been through a four-year budget strategy in which we have reduced the cost of audit by more than 20%.
"I struggle to see how we could reduce our costs by anything approaching that amount.
"We would continue to apply that pressure, but the options we would have would be to ask the SCPA for funding or look at recovering it through local government fees, neither of which is palatable."
In a letter to the SPCA, Ms Gardner said: "If the agreement is not continued in future, the cost of local government audit would rise by 4-5%.
"We believe HMRC have some fundamental misunderstandings about the current arrangements and have responded robustly."