Councillors have voted to partly complete the tram project in Scotland's capital.
The decision to take the route from Edinburgh airport as far as St Andrew Square in the city centre was made at a full council meeting to debate the options available.
Other proposals would have seen the trams scrapped completely at an estimated cost of around £750m or to complete the beleaguered scheme in full.
The other option was to finish the project as far as Haymarket in the city's west end costing £700m.
After a five-hour discussion in front of a full public gallery, councillors decided to complete the project as far as St Andrew Square at a cost of £770m.
The original estimated cost of a longer line from Edinburgh Airport to Newhaven was put at £545m.
The tram works have been dogged by delays, overspend and an earlier dispute between contractors Bilfinger Berger and tram company Tie.
The decision to build the line as far as St Andrew Square will be confirmed at the next meeting of the council on 25 August ahead of a deadline on 31 August set as part of the mediation process.
A report prepared by senior council officials looked at the options available to the Council, within the constraints of the contract between Tie and the infrastructure contractor. The authors concluded that the St Andrew Square option delivered the "best prospect of a return on investment" making an annual profit of £2m.
Subject to funding approval, the report says the line from Edinburgh Airport to St. Andrew Square could be completed by 2013 with revenue services beginning from the spring of 2014.
As part of the plans for moving forward it was agreed that the programme of works to fix and complete the Princes Street section of the route could go ahead at the beginning of September after the tarmac on the city's main thoroughfare cracked.
Sue Bruce, chief executive of the council, said: "Councillors were effectively deciding on how Edinburgh is going to grow and develop in the future. A modern public transport system is a catalyst for investment, jobs, regeneration and cleaner air.
"I can fully understand why they are seeking more certainty on what is a hugely important decision for this city. I will continue to work closely with the consortium, with whom we have an ever-improving relationship, to bring back more detail on the various funding options available to the council."
Spanish firm CAF has already built the tram vehicles that will run on the line when it is eventually completed.