A project to link the Borders by rail will be carried out by Network Rail after potential contractors dropped out the bidding process.
It was recently reported two of the three bidders for the Borders Railway had dropped out the process. The remaining company were demanding more money for the construction.
The new deal will see Transport Scotland go into partnership with Network Rail but will still be over the initial £230m budget at around £295m.
It is hoped the project will still be finished by the initial date of December 2014. It will see trains return to Midlothian and the Borders for the first time in 40 years.
The government is said the project will generate 200 to 400 jobs as part of the construction and the route will contribute £40m to the local economy.
Transport Secretary Keith Brown said: "I am pleased to announce this new route forward for the Borders Railway project which will return a long-awaited public transport link to communities who lost it over four decades ago.
"We continue to be steadfastly committed to this vital scheme and we are actively managing and making prudent decisions to ensure efficient delivery as quickly as possible.
"Despite early enthusiasm from bidders, it is disappointing that two consortia dropped out for their own commercial reasons. Following the withdrawal of IMCD from the procurement in the summer, we said we would consider our options to find the right way forward to deliver the project for the best value in the shortest possible time. Today’s announcement concludes that process.
"Network Rail has confirmed it is pleased to be asked to take this project forward and I am confident it is able to deliver the project within budget and with significant ongoing savings to the public purse. I am pleased to have the opportunity to build on the success of the Airdrie to Bathgate project which also featured a partnership between Transport Scotland and Network Rail."
Paul Plummer, group strategy director, Network Rail said: "Having successfully completed the Airdrie-Bathgate rail link project on time and to budget, we welcome this opportunity to work with the Scottish Government towards the delivery of another important piece of new railway infrastructure in Scotland."