The revelation follows a year-long transparency battle with the council, which initially refused to release the figure to this newspaper due to “confidentiality” concerns.
However, following intervention from the Scottish Information Commissioner, the council released the total cost of the defence linked to the inquiry, which has been cumulatively paid by taxpayers since 2015.
In total, the council spent £1,978,871 on external legal advice and costs including the hire of top advocate, the late Roy Martin QC, to represent the council at the tram inquiry’s hearings.
An initial budget of up to £2m had been agreed by the city council in 2015, but the legal bill only covers the council’s external legal costs as it defended itself during the inquiry.
Additional costs incurred by the local authority’s in-house legal team are still unknown.
In total, the tram inquiry has cost taxpayers around £12m, with the final report still yet to be published by Lord Hardie seven years on from when it was first announced by then-first minister Alex Salmond.
The tram project itself cost the taxpayer £776m after years of delays and contractual disputes – more than double the originally estimated cost of £375m.
The final figure for the legal bill connected with the inquiry has been described as “eye-watering” by Liberal Democrat Holyrood candidate for Edinburgh Western, Alex Cole-Hamilton
He said: “These costs are through the roof. After almost a year of pressure, they have been forced to reveal the true legal bill and it is eye-watering.
"This inquiry will have made a lot of lawyers very happy, but the taxpayers of Edinburgh less so.
"Worst of all, we still don't have an inquiry report and no idea of when recommendations will be published"
Alongside the £2m bill for external legal advice linked to the inquiry, the council has also racked up an additional legal bill of almost £500,000 connected with the tram project since 2015.
The largest of these bills is £315,456 spent on external legal advice connected to the tram extension to Newhaven, which began construction in November 2019 before the tram inquiry could report back.
A further £131,000 has been spent on external legal advice on tram maintenance arrangements alongside almost £30,000 for advice on tram land acquisitions.
Sarah Boyack, the Scottish Labour Holyrood candidate for the Lothian region, said the final total linked to the inquiry was “shocking”.
She said: “While Edinburgh’s Tram has improved public transport choices for people, the results of the Edinburgh tram inquiry is long overdue. People need to know why the cost for the project went from £375m to almost £1 billion and its completion was years late.
“It’s shocking that the council spent almost £2m on legal advice related to the inquiry. We need to know why.”
Conservative group chairman, councillor Jason Rust, said taxpayers feel like they are “paying twice” for the tram fiasco.
He said: “Residents will be astonished at the huge costs which have been racked up. It is even more frustrating given there remains no sight of the inquiry report.
"It feels that taxpayers are paying twice for this debacle, both in terms of the original project and now through this never-ending inquiry, which has lasted longer than the delayed construction.
"At a time of hugely constrained council budgets, it is incredible that millions are having to spent in this way, especially as lessons learned from the original project would have been of greater worth the sooner they were reported."
Responding, a council spokesperson said: “An inquiry of this nature and duration inevitably requires a significant level of legal representation, and this will be the case for all participants in the Edinburgh tram Inquiry.
"This potential costs and related authority was, indeed, acknowledged in a report to council in the early stages of the inquiry and elected members have been kept updated since.”