BT and government said the move would boost access to broadband
Small BT telephone exchanges serving remote and rural areas in Scotland are to get a £3m upgrade to increase access to broadband.
The telecommunications giant is in talks with the Scottish government to select about 50 sites for improvement.
Finance Secretary John Swinney said the plan recognised the frustration of some communities that faster internet services were not available.
The full details of the upgrades are to be agreed over the next few weeks.
The investment was announced amid a row over UK government plans for a broadband tax.
The 50 pence a month tax would apply to everyone with a fixed line telephone and "will be law before the next election", according to Minister for Digital Britain Stephen Timms.
But Conservative MP John Whittingdale said the tax, which could raise up to £175m a year to fund high speed networks, would be opposed by his party.
On the upgrading of rural exchanges, Mr Swinney said: "While Scotland has high levels of broadband availability, the Scottish government and BT recognise the frustration felt in some rural communities where people are unable to obtain a service."
He added: "After exploring the many challenges with BT, we are pleased that a way forward has been found allowing an exchange upgrade programme to take place."
BT announced last week it had successfully trialled new technology at Inverness, Culloden and Dingwall exchanges.
A spokesman said this delivered a stable broadband service over lines that were up to seven miles away from the exchanges - more than double the current three mile reach for broadband.
Last month, Inverness Chamber of Commerce warned that broadband speeds in the Highlands could see businesses lose out in the digital global economy.
Chief executive Stewart Nicol was to meet communications regulator Ofcom to pass on local concerns.
With an increasing reliance on doing business online, the chamber said many Highland firms believed slow broadband speeds and the lack of effective satellite broadband in more remote areas were hampering business growth.
Roxburgh and Berwickshire MSP John Lamont said the move could provide a boost to the Scottish Borders if it delivered on its promises.
"For too long, communities in rural areas such as the Borders have had to put up with a sub-standard broadband service, with some having no access to broadband at all," he said.
"This poor service is annoying for many residents but it is a major burden on many small businesses who need a fast reliable internet connection.
"I am pleased that the Scottish government has recognised the problem in rural areas such as the Borders and that action is to be taken."