A former top prosecutor will chair the public inquiry into why Edinburgh's new tram service was delayed and over-budget, the First Minister has announced.

Alex Salmond has revealed former Lord Advocate and senior judge Lord Hardie is to lead the inquiry.

He said that Lord Hardie would start this work immediately and added: "We look forward to a swift and thorough inquiry."

The First Minister announced to Holyrood last week that there would be a judge-led inquiry into the controversial project.

Trams began running in Edinburgh at the end of May after years of delays, spiralling costs and a lengthy dispute between the city council and its contractor.

Overall, the scheme to return trams to the streets of Scotland's capital has seen the construction of a line from Edinburgh Airport to York Place, costing about £776 million.

The inquiry will look at the project, examining its governance, management and other areas to try to find out why it was delayed, and why it "cost considerably more than originally budgeted for and delivered significantly less than was projected through reductions in scope", according to its remit.

It will also consider the consequences of the failure to deliver the project on time and on budget, as well as making recommendations on how similar projects could avoid such problems in the future.

Lord Hardie will appoint a team to carry out the inquiry and set out a timetable for the work.

Mr Salmond said: "Last week I announced a judge-led inquiry into the Edinburgh Tram project.

"Today I can confirm that the inquiry will be chaired by former Lord Advocate and senior judge Lord Hardie.

"The terms of reference for the inquiry have been agreed with Lord Hardie.

"They will be to inquire into the delivery of the Edinburgh Trams project in order to establish why the project incurred delays, cost considerably more than originally budgeted for and delivered significantly less than was projected through reductions in scope."