LIKE so many episodes in the tragi-comic history of the Edinburgh trams project, it started with a cock-up: an entirely self-inflicted, amateurish, and absurdly expensive cock-up.

A week last Thursday, the City of Edinburgh Council met to consider approving yet another budget revision for the troubled scheme.

After starting out priced at £545 million for 11.5 miles from the capital’s airport to Leith, the tram line had been shortened to eight miles, to St Andrew Square at the eastern end of Princes Street, while the bill had risen to £776m.

With the Scottish Government refusing to increase its contribution over an agreed £500m, that meant the council having to borrow the extra £231m. Once interest was factored in over 30 years, the repayments would be £459m, taking the final bill to an eye-watering £1 billion.

Normally at such meetings, after much hot air and blame, the five parties on the council would propose five different plans, vote only for their own, and the Liberal Democrats, the senior partners in a coalition with the SNP, would get their way.

The Tories, who had always voted for axeing the scheme entirely, were confidently expected to abstain on any other proposal.

So when Labour advocated saving £76m by halting the line at Haymarket, west of the city centre, the administration parties had sighed wearily, assuming the plan was doomed to fail.

Labour’s Haymarket idea was “laughable”, felt Steve Cardownie, the council’s deputy leader and head of the SNP group.

But, laughable or not, to the horror of the LibDems and SNP, the Conservatives broke with past practice and threw themselves behind Labour.

After two years as the expected end of the line, the St Andrew Square option was suddenly out, and Haymarket was the new terminus.

Exasperated, Jenny Dawe, the tousle-haired LibDem council leader, muttered to colleagues: “Sometimes democracy really sucks.”

It was a huge miscalculation by all concerned.

The SNP didn’t think the Haymarket option had a hope of succeeding, so abstained on the key vote to preserve their pristine record of opposition to the project. If they had voted with their LibDem partners, it would have been St Andrew Square as planned.

“I was incredulous,” said Cardownie. “We thought that the Tories would have abstained. Little did we think they were going to join with Labour.”

Labour and the Tories didn’t have to wait long to find out what the public thought of their move: the decision was almost universally denounced as a new low in the trams debacle.

Edinburgh Chamber of Commerce neatly summed up public sentiment by calling it “bonkers”.

Not only would the Haymarket option be lose money from the off, costing city taxpayers £4.8m a year to subsidise, it was also the least practical for travellers.

Tourists arriving at the airport would be expected to heave luggage on to a tram, then heave it off again just shy of the city centre, and catch a taxi or a bus to take them the last two miles into town.

Commuters would suffer in similar fashion.

It was obvious that people would take a bus or taxi the entire route rather than put up with the hassle of separate trips.

There was also a bill to rewrite the contract. The consortium building the line – Bilfinger Berger, Siemens and CAF – was shocked at losing a quarter of the track and wanted compensation.

Sue Bruce, Edinburgh’s chief executive, flew to Frankfurt to meet Bilfinger and Siemens over the weekend.

Although the companies appreciated the personal touch, they were adamant about getting paid.

They wanted “demobilisation costs” for standing down contractors which had been about to restart work on Princes Street; “prolongation costs” for yet another hold-up; and “compensation for their loss of profit” on the route beyond Haymarket.

It quickly became clear that terminating the line at Haymarket could prove more costly in the long run than going to St Andrew Square.

One solution would be a swift U-turn and a return to the St Andrew Square option. But there was a problem.

By law, the council was unable to revisit its decision within 12 months unless there was a material change in circumstances. Feeling sheepish about a mistake wasn’t enough.

At this point, the SNP Government stepped in. Since being out-voted in 2007 on the trams and forced to contribute £500m at the start of their first administration at Holyrood, SNP ministers had made no secret of their loathing of the scheme, or their belief it would end in tears. Transport Scotland, the national transport agency, had pulled out of an oversight board and left the council and partners to get on with it.

Hell mend you, was the message from on high.

But the Haymarket decision could not be ignored. The nation’s reputation was it stake, and ministers could no longer sit on the sidelines.

On Tuesday morning, Transport Scotland director Ainslie McLaughlin told Bruce that ministers felt Haymarket was a “fundamental change” to the project they had reluctantly agreed to fund, and they wouldn’t pay another penny toward it.

Finance Secretary John Swinney later confirmed this meant he would withhold a final £72m tranche of the £500m contribution to the line.

With that money out of reach, the credibility of the Haymarket option collapsed.

Normally, the last thing a minister would expect for taking away £72m would be a welcome, but Dawe greeted the move enthusiastically.

It gave the council the vital pretext it needed to revisit its own decision.

Dawe told the Sunday Herald: “That announcement changed things entirely. Until then there had been little difference in the cost of going to Haymarket and having a loss-making service, and going to St Andrew Square and having a profit-making service. The loss of the £72m made the difference between the two.

“That was the real turning point because we could revisit the decision. There had been a material change in the circumstances.”

Andrew Burns, the leader of the Labour group, agreed about the significance. “That was the stand-out point of the week.”

Jeremy Balfour, leader of the Tory group, was more critical of the Government.

“It seemed to be national government trying to block the will of local government, and I think that’s actually a big issue for the longer term. Whether you agree or disagree with what the council did, it was their democratic will, and the Scottish Government intervened in such a way that they torpedoed that decision.”

At 5pm, the leaders of the political groups and their transport spokespeople met with officials and contractors to discuss the way forward.

The presence of the contractors was a novelty. Amazingly, they had previously been absent, and councillors had to rely on information filtered via council officers.

“That always astonished me, but I’m not in charge,” said Burns.

The changed format brought a changed atmosphere. The politicians emerged slightly stunned at the co-operation they received, and praised it as the most constructive meeting yet on the trams.

But the message had been a blunt one. “What I took away from it was that it was either St Andrew Square or terminating the contract,” said Balfour. “Haymarket was no longer an option after the Transport Scotland letter.”

After that cross-party meeting, Cardownie held another gathering for SNP councillors. He said: “Everybody expressed the view that in their heart of hearts, Haymarket was the only option.

“I think John Swinney’s decision was inevitable. It was logical, and it concentrated minds.”

Later that day Swinney appeared on Newsnight Scotland and admitted withholding money had been designed to force the council into a rethink. Ending at Haymarket, he said, was absurd.

On Wednesday morning, Cardownie made the SNP’s revised position public. Given the choice between cancellation, which would cost the city £161m in one fell swoop and cripple taxpayers and cut services, or the idiocy of Haymarket, or St Andrew Square, the SNP would back the latter as the least bad option.

It was now clear that, barring disaster, the numbers were there for St Andrew Square.

There was a packed public gallery for the next council meeting on Friday morning, with the press, Lothian Bus drivers worried about squeezed profits, and protestors jostling for space.

Many of the contributions from the councillors below produced hoots of sarcastic laughter, particularly Dawe huffing about someone else throwing dodgy figures around, but in the end the debate was low-key and restrained.

After a little over two hours, the voting began, and the foregone conclusion was delivered. Labour went from backing Haymarket to backing St Andrew Square; the SNP went from abstaining to backing St Andrew Square; and the Tories went from backing Haymarket back to scrapping the whole thing.

Only the LibDems and Greens were consistent in supporting the St Andrew Square option.

But few councillors, if any, emerged with credit. They knew in the public’s eye they would all be branded incompetents.

The extra week also added at least £300,000 cost to the project, which is now due to open to 2014. What next?

Bruce says she will work to deliver the trams within the £776m, but has approval to reach a settlement on an “unconditional basis”.

The next immediate obstacle is realigning the maze of pipes and cables under Shandwick Place, between Haymarket and Princes Street. There are hundreds of “conflicts” to fix, and no one knows the cost, though £70m is available.

“It might go up,” admits Cardownie. “Who knows until we have a good look. What’s under the streets is anyone’s guess. But I have more confidence in our officials in securing the best deal possible for this city.”

Burns and Balfour predict costs will rocket.

As to the maturity of Edinburgh councillors, with 29 in the coalition and 29 in opposition parties, and local elections looming in May, Dawe isn’t expecting any improvement overnight.

In fact, she expects the squabbling to get worse.

“That’s politics,” she sighs.

‘Sometimes democracy really sucks.’

Jenny Dawe, LibDem leader

‘Swinney’s move was the standout point of the week.’

Andrew Burns, Labour leader

‘The Government torpedoed

our decision.’

Jeremy Balfour, Tory leader

‘What’s under the streets is anyone’s guess.’

Steve Cardownie, SNP leader

‘John Swinney’s decision concentrated minds’