Express trains linking Scotland's cities will have free wi-fi equipment installed by the end of next year, it has been announced.
It follows a successful trial on four trains running mainly on the Edinburgh to Glasgow Queen Street line.
After the trial, 77% of users were happy with the speed and performance of the wi-fi.
All trains between Glasgow Queen Street and Edinburgh will now have wi-fi equipment installed, as will services on Edinburgh/Glasgow to Aberdeen/Inverness routes, the Aberdeen to Inverness service, the Glasgow/Edinburgh to Stirling/Alloa routes and on the Fife circle.
It will allow travellers to check emails, browse the internet and access social media sites such as Facebook and Twitter.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."
The number of trains with wi-fi should steadily increase from March, 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. It is essential that people throughout Scotland have online access to enable our economy to thrive, which is why we are already forming plans to further expand wi-fi provision across the rail network."
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.
"We will be fitting wi-fi during planned weekend maintenance, to avoid taking trains out of service."
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.