A feasibility study into the future of justice services in the Borders has recommended the retention of courts in Jedburgh and Selkirk.
A working group was looking at the options for the region.
The future of the courts was put under threat after it was suggested that a justice centre be created in Galashiels.
The suggestion came shortly after the closure of Duns and Peebles sheriff courts was approved. They are due to close in 2015.
But it has concluded that the best approach is to keep the two courts but improve the use of technology between them.
The feasibility study which advised the retention of the two sites has now been approved by the Scottish Court Service board.
Scottish Court Service chief executive Eric McQueen said: “I welcome the feasibility study conclusions, reached after extensive dialogue with a wide range of justice organisations on future justice services in the Scottish Borders.
“I am confident this gives us a solid platform to deliver the best services for the people of the Scottish Borders.
“The feasibility study shows that while it is right we test the concept of justice centres it is equally important that we tailor approaches that are right for local communities, and we will continue with this approach as we consider justice centres in other locations.”
The study will be considered by Scottish Borders Council at a meeting on Thursday.
South of Scotland Lib Dem MSP Jim Hume described the decision as a “victory for local campaigning against further court closures”.
Berwickshire MSP John Lamont added: “I am delighted that the Scottish Courts Service has finally seen sense and put an end to this ridiculous notion. The closure of Duns and Peebles sheriff courts was a body blow to our justice system in the Borders, and to follow this up by shutting more sheriff Courts was verging on lunacy.
“We need a justice system that is tailored to the Borders, and closing local courts and centralising our court system in Gala would achieve the exact opposite of this.
“It would have meant that the majority of Borders residents would be left with a huge journey to access their justice system, and leave many unable to make early morning appointments.
“I can only hope that the results of this study will help secure the long-term future of these courts.”