The franchise run by Abellio, Scotland’s main railway operator, will end three years early after anger from commuters over cancellations and poor services.

Michael Matheson, the Scottish government’s transport secretary, said he had triggered a clause to end Abellio’s ScotRail contract in 2022, three years earlier than originally planned.

Through the franchise, Abellio, a Dutch state-owned operator, controls nearly all domestic rail services in Scotland but has faced mounting anger over cancelled trains, overcrowding, missed stops and poor customer service.

In December 2016, the government gave out £3m in discounts to commuters hit by cancellations and delays.

Matheson told MSPs at Holyrood he had rejected Abellio’s request to increase the subsidy it needed from 2022 onwards, which had the effect of ending the franchise in that year.

He said the government, which pledged £7bn of public funding over 10 years when Abellio won the contract in 2015, had to ensure it delivered value for money, passenger satisfaction and fully used the network’s capacity.

“We are not satisfied that the significant increase in public subsidy that would otherwise be required, would generate commensurate benefits for passengers, communities and the economy,” he said.

Scottish Labour, which has put ministers under intense pressure to nationalise ScotRail, said it was delighted.

Colin Smyth, Labour’s transport spokesman, said: “For years Scottish Labour have campaigned to end Abellio’s shambolic spell in charge of Scotland’s railway. [We] are glad that the SNP have finally swallowed their pride and listened to what Scottish Labour has been calling for.”

Dominic Booth, the managing director of Abellio UK, said they were hugely disappointed and said their rejected offer would have seen improved performance at reduced cost. Appointing new franchisees would also delay efforts to electrify the network.

“Abellio has invested more than £475m 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,” he said.

The Scottish government conceded last year it would allow a public sector bid to compete for the next franchise, but stopped short of agreeing to its nationalisation.

Ministers set up a study to look at how a public bid might work but Matheson told Holyrood that was being put to one side because a UK government review, the Williams review, was looking at the entire franchising system.

Kevin Lindsay, Scotland organiser for Aslef, the train drivers union, said the franchise system was a broken model. “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 said.

“But 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.”