Express trains linking Scotland's cities will have free wi-fi by the end of next year as a result of a £2 million investment from the Scottish Government.
Wi-fi equipment will be installed on all 59 of ScotRail's class-170 trains. The technology has been trialled on four trains which mainly run on the busy Edinburgh to Glasgow Queen Street line.
Extending it to all the trains means passengers on this route, the Edinburgh/Glasgow to Aberdeen/Inverness routes, the Aberdeen to Inverness service, the Glasgow/Edinburgh to Stirling/Alloa routes and on the Fife circle will benefit from free wi-fi during journeys.
Business leaders welcomed the move, with David Birrell, chief executive of Edinburgh Chamber of Commerce, saying: "Increasing wi-fi access on trains will undoubtedly enhance the ability for business people to stay connected and therefore improve productivity during transit. That can only be welcomed."
After the trial, 77% of users were happy with the speed and performance of the wi-fi. From March the number of trains with wi-fi should steadily increase, with plans to fit the technology on about five or six trains a month.
Announcing the move, Transport Minister Keith Brown said: "We have an absolute commitment to bringing better connectivity to every corner of Scotland and I have been highly encouraged by the success of ScotRail pilot scheme.
"A major challenge for the transport industry is embracing new technologies to meet the demands of passengers and help them get on with their evermore busy lives while travelling. Just like our roads and railways, the internet is a vital part of Scotland's infrastructure."
Steve Montgomery, managing director of ScotRail, said: "We are confident the installation of free wi-fi will be warmly welcomed by our customers. More journeys are made on our class-170s than any other of our trains, so it makes sense to begin the roll-out on this fleet."
An ethernet "backbone" is fitted to the trains, with a wi-fi router mounted in the roof space close to the antennae. Inter-vehicle "jumpers" are then used to allow internet access in all carriages. There will still be areas where wi-fi is not available, due to variations in mobile-signal strength along the rail network.