A public inquiry into why Edinburgh's controversial trams were delayed and over budget has been given statutory powers after "a lack of co-operation".

The powers will allow inquiry chair and senior judge Lord Hardie to compel witnesses to participate and evidence to be produced.

Announcing the move under the Inquiries Act 2005, Deputy First Minister Nicola Sturgeon said the lack of participation by some parties was "unjustifiable".

She said: "It was the view of the Scottish Government that a non-statutory inquiry with the co-operation of those with knowledge of the project was the simplest way to ensure the swift answers that people want.

"Lord Hardie has however now reported a lack of co-operation by some, which is clearly unjustifiable. I have therefore given the inquiry the statutory powers he has requested to ensure that the necessary evidence is secured and a robust final report produced.

"Lord Hardie has assured me that converting the inquiry to a statutory basis will not increase the costs and time required as he had intended to apply similar procedures. I continue to attach great importance to an inquiry that is quick, efficient and cost effective."

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 is looking 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 said: "The inquiry was announced by the First Minister in June 2014 with the aim of establishing why the Edinburgh Trams project incurred delays, cost more than originally budgeted and through reductions in scope, delivered significantly less than projected.

"The inquiry was initially non-statutory but was converted to statutory by Scottish ministers following my request, to ensure it can be carried out thoroughly and efficiently and to allow me to produce a comprehensive, fair and balanced report.

"The inquiry is currently in the preliminary investigation stage, which includes retrieving and reviewing a large body of documentary evidence, scoping the work to be carried out, identifying potential witnesses, as well as securing sufficient staff and technical resources to manage material recovered."