The "ridiculous" contract for the Edinburgh trams project represented an "extremely poor deal" for the city council, an inquiry has been told.

A lawyer for several former employees of Transport Initiatives Edinburgh (Tie) - the local authority's arms-length company tasked with handling the scheme - said the contract "tended to encourage disputes" and that the pricing information within it was confusing.

The Edinburgh tram inquiry further heard claims from the main contractor that work to deal with utilities in the ground was the "critical delaying factor" throughout the project.

READ MORE: Edinburgh trams plan puts historic street 'under threat'

The statements were made during closing submissions at the official inquiry into the capital's troubled trams project.

The probe, chaired by Lord Hardie, is examining why the trams were delivered late, over-budget and with a truncated route. The eventual cost of the project at £776 million was more than double the sum earmarked at the outset.

The cost of the inquiry now stands at £9 million, Transport Scotland has confirmed.

Addressing the inquiry, Douglas Fairley QC, representing several ex-Tie employees, accepted that some of those he represents "may on occasion have made errors of judgment".

He insisted that was against a backdrop of "extreme difficulty created by others who either preceded them or in some cases were senior to them within the organisation".

"Nowhere was that more so than in the context of the contract," he said.

READ MORE: Edinburgh tram company loses bid to have reports kept secret

"If I may paraphrase a recent pronouncement by President Trump, this was a contract which was ridiculous and which should never have been made.

"It was a terrible contract for Tie and, by extension, a terrible contract for CEC (City of Edinburgh Council)."

He agreed with a view expressed by others "that the way in which the contract was constructed tended to encourage disputes".

The QC described one aspect of the document as "clunky", "cumbersome" and "at best productive of extensive delays".

"An unintended effect of that was to allow a contractor, if it had a mind to do so, to hold its employer to ransom," he said.

Pricing details in the contract were described as "confusing and opaque".

He said: "It would be fair to say that any contract which left the door open to an argument by the contractor that something as basic and fundamental as the employer's requirements for the construction of the tram network was an extra over and above that which had been priced was an extremely poor deal for the council."

Mr Fairley further claimed that the decision to withdraw Transport Scotland from the governance structure of the project was "particularly ill-judged".

Garry Borland QC, for contractor Bilfinger Construction UK Ltd, said that the utility works (known as Mudfa works) - over which they had no control - were "very far from complete" in the run-up to the contract between Tie and the infrastructure consortium (Infraco) being concluded.

He argued that the utility work should have been completed before the summer of 2008 and the start of construction work, but was actually finished "years late".

"Bilfinger's position is that the Mudfa issue was the critical delaying factor throughout the project up to the mediation at Mar Hall and indeed it continued to have effect thereafter," he said.

READ MORE: 3000 share views in Edinburgh tram consultation

Mr Borland also said the design of the project, which they had no control over, was "to a very significant degree incomplete" in the run-up to the execution of the contract. By December 2007 around 40% of the detailed design was lacking, he argued.

A number of third-party approvals, necessary for the construction work to progress, had also not been issued by others, it was claimed.

"The result was that there were material and unquantifiable risks which existed at the time Tie and Infraco were negotiating the contract in late 2007 / early 2008," the QC said.

"Bilfinger's position before the inquiry is that Infraco's approach to dealing with material and unquantifiable risk, namely to seek to shift it to Tie, such that it was Tie's contractual responsibility, was entirely reasonable in the circumstances."

He also maintained that Tie lost every significant point of principle at adjudications.

The inquiry continues on Thursday.