Proposals to realign the A7 road to allow the Borders to Edinburgh rail route to re-open have been agreed by planning councillors.
The works at Falahill Cottages near Heriot will see a double roundabout being created.
The scheme has provoked widespread opposition in the area.
However, Scottish Borders Council planning officers had recommended approval for the project provided a long list of conditions is met.
Councillors voted 4-3 to approve the plans.
Site investigation works recently started on reopening the line between Tweedbank and Edinburgh.
It is hoped the route will be operational by 2014.