Abellio is to be stripped of the contract to run ScotRail services, it has been announced.
Transport Secretary Michael Matheson told MSPs on 18 December that the franchise will end around March 2022.
The railway firm has previously been criticised for overcrowding and rising ticket prices.
Under the terms of the current contract, which started in 2015, the Scottish Government and Abellio were required to revisit cost and revenue assumptions.
Matheson said following “extensive and rigorous analysis”, the decision was taken not to continue the contract for the full 10 years.
He said: “I can confirm that I have, today, issued a notice to inform Abellio ScotRail of the decision.
“Therefore the current franchise agreement is expected to come to an end in March 2022.”
The Transport Secretary said Abellio has had “successes and challenges” over the first five years of its franchise.
“I believe that the decision I have advised the parliament of today, in respect of the ScotRail franchise, is the right one for passengers, communities, the economy and taxpayers,” he said.
“It is of course necessary to plan for the future provision of ScotRail services and I can confirm that work is already under way to examine the options open to the Scottish ministers after the current contract comes to an end”.
Dominic Booth, managing director of Abellio UK, said the decision would create “unnecessary uncertainty” for its passengers and staff.
“We are hugely disappointed by this decision and believe it’s the wrong choice for Scotland’s railway and its customers,” he said.
“Abellio has invested more than £475 million in new and upgraded trains, added 23% more seats for customers and created more than 500 extra jobs in Scotland since the start of the franchise in 2015 – the biggest investment in trains and stations in over 150 years.
“Our offer to Transport Scotland would have delivered an improved service for our customers at a reduced cost to the taxpayer.
“We will remain fully committed to running a safe and reliable service until the end of the contract in 2022.”
Kevin Lindsay, organiser for the train drivers’ trade union Aslef in Scotland, said: “We are delighted by the decision announced today because we have argued for a long time that Abellio has been letting down passengers and staff here in Scotland.
“We also welcome the opportunity for a public service provider to bid to run the franchise in two years’ time because we have been campaigning for years for the government here to do something about the plight of passengers who use the ScotRail services provided by Abellio.
“Those of us on the front line – ScotRail train drivers and other railway staff – can see every day how the company comes up short.”
He added: “We are disappointed that the SNP government has not grasped the real problem – and the solution to that problem – and simply taken this opportunity to bring Scotland’s railway back into public ownership.
“The truth is that the franchise model is a broken business model. It hasn’t worked, it doesn’t work and it will not work.
“Everyone on the railway understands that.”