Nearly £200m of public money has been spent on the four public inquiries currently taking place in Scotland, new figures have shown.
The Scottish government has paid £150.4m in running costs - but BBC Scotland has now identified a further £36.4m in costs for the dozens of public bodies taking part.
The BBC has also learned that £3.3m has been spent on the salaries of those chairing the inquiries, which are examining the Covid crisis, hospital safety, child abuse and the death of Sheku Bayoh.
Questions have been raised about the cost-effectiveness of the inquiries but the Scottish government said they provided important opportunities to establish facts and learn lessons.
The inquiries have already published details of their ongoing costs. That £150.4m – which ranges from £19.2m for the hospitals inquiry to £85m for the child abuse inquiry - is paid by the government.
BBC Scotland asked dozens of public bodies, such as councils and health boards, how much participating in the inquiries had cost them.
A number of organisations said it was not possible to work this out. Those which responded had spent a total of £36.4m in preparing and giving evidence.
The biggest costs were associated with taking part in the complex Scottish Child Abuse Inquiry, which has been running for almost eight years. A total of £24.9m has been spent by the public bodies participating, according to the data released under freedom of information laws.
Some public bodies now have special units which deal with the demands of the statutory inquiries.
Police Scotland’s Public Inquiries and Fatal Accident Inquiries division has cost £20.6m since 2019 but the force said it was not possible to break down how much of this related to three of the ongoing public inquiries.
Officers dealing with the Scottish Child Abuse Inquiry response are in a different team and Police Scotland said it had spent £11.6m on the inquiry so far.
Nearly all of this was staffing costs.
Scottish government figures released under freedom of information laws have also revealed how much has been earned by those running the inquiries.
Since July 2016, the government has provided the Scottish Child Abuse Inquiry - which is investigating cases of abuse of children in care - with £1.9m to pay Lady Smith for her role as its chairwoman.
Lord Bracadale, chairman of the Sheku Bayoh inquiry - which is examining the circumstances leading up to the 31-year-old's death in May 2015 - has been paid £512,512 since November 2020.
Elsewhere, Lord Brodie has banked £614,400 for being in charge of the Scottish Hospitals Inquiry since 2020.
These payments are made directly by the inquires as all three are retired judges, although Lady Smith was not retired when she took up her role.
Lord Brailsford, chairman of the Scottish Covid-19 Inquiry, is still employed as an outer house judge by the Scottish Courts and Tribunals Service.
This means his £212,351 annual salary has been reimbursed by the Scottish government since he was appointed in October 2022 to cover the costs of a replacement judge.
James Mitchell, Professor of Public Policy at the University of Edinburgh, believes one of the Scottish Parliament’s committees should investigate the effectiveness of public inquiries.
He said: “I think it would be dangerous to say we should not have public inquiries but we have got to be careful that they are not just used to push an issue off the agenda.
“In some cases we are certainly getting value for money from public inquiries, in other cases maybe not so much.
“Without wanting to add to the number of inquiries, we could do with some reflection to figure out how we could do it much more cost effectively - but also effectively in terms of what follows from them, in terms of are they acted upon?”
Prof Mitchell said this scrutiny was even more important given the state of the public finances, adding, "money is tight and it’s going to get tighter".
The cost of Scottish government-initiated public inquiries are dwarfed by those which have been called by the UK government.
An inquiry into the infected blood scandal has cost £140m, while the Grenfell Tower inquiry has cost £173m. Almost £93.7m has been spent on the UK Covid Inquiry so far.
A further five public inquiries have been called and completed by the Scottish government since laws were introduced in 2005 which allowed ministers to call statutory inquiries on devolved issues.
This includes a probe into the ICL Stockline Plastics explosion in Glasgow, an inquiry which took 17 months and cost £1.91m, and the investigation into the delayed Edinburgh Tram project.
This public inquiry took nine years to complete and cost more than £13m.
Its chairman Lord Hardie was paid more than £1m for the role.
Two further statutory public inquiries have recently been announced by the Scottish government.
One will look at the investigation of Emma Caldwell's murder in 2005 and the other will consider disgraced surgeon Prof Sam Eljamel who harmed dozens of people while working as NHS Tayside's head of neurosurgery.
A Scottish government spokesperson said: “Public inquiries provide important opportunities to establish facts and to learn lessons for the future in the most transparent means possible.
"In many cases, such as the Scottish Covid Inquiry, they are set up with the support of the Scottish Parliament.
“Public inquiries operate independently of government and it is for the chair – who has an ongoing duty to avoid unnecessary costs – to direct how he or she carries out its functions.”
Those who chair inquiries have a duty to avoid unnecessary costs, and the rates of pay for sitting or retired judges are set by the UK Ministry of Justice.