(Adds details, quotes)
MOSCOW/KIEV, March 2 (Reuters) - Russia's Gazprom said on Friday it would terminate its gas contracts with Ukraine after it lost a court case, escalating a dispute which has left Ukraine struggling to stay warm and which the EU said could threaten gas flows to Europe.
A Stockholm arbitration court ordered Gazprom this week to pay more than $2.5 billion to Ukrainian energy firm Naftogaz - a ruling meant to conclude a long legal battle that has run alongside Ukraine's broader political stand-off with Russia.
But after the court decision, Gazprom did not restart gas supplies to Ukraine as expected on Thursday, forcing Kiev to take emergency measures to make up for the shortfall and warn that transit flows to Europe were at risk.
To make up for the lack of supplies from Russia, Kiev has suspended lessons at schools, universities and kindergartens until next week, switched power stations from gas to fuel oil and bought extra gas from Poland.
Ukrainian President Petro Poroshenko said Gazprom had no right to suspend its contracts, and he expected them to remain in force. The moves showed that the Russian gas giant was not a reliable supplier, he said.
The threat of a supply cut to Europe comes as the continent has been hit by a record-setting cold spell, driving up demand.
In a statement, Gazprom CEO Alexei Miller said the court's ruling meant the company's gas deals with Ukraine would no longer be commercially viable, so it had no choice but to ask the court to terminate them.
"Gazprom had to immediately start the procedure of the termination of the contracts with Naftogaz on gas supplies and transit at the Stockholm arbitration court," Miller said.
Naftogaz declined immediate comment on the decision.
On Twitter, Ukrainian Foreign Minister Pavlo Klimkin said: "Yesterday I called Gazprom con artists, but today they are behaving like poker players and trying to raise the stakes. Only it's not clear what they're playing or with whom."
The row represents a new chapter in a long-running disagreement that prompted Russia to suspend gas exports to Europe, notably in the winters of 2005-2006 and 2008-2009.
European Union Commission Vice President Maros Sefcovic said Brussels was concerned not only about the supply of gas to Ukraine, but also about the transit of gas to the bloc.
"The Commission stands ready to steer a trilateral process which in the past has already proven to be effective in situations of disagreement," Sefcovic said in a statement.
Ukraine is the main route for the Russian gas to Europe where Gazprom accounts for around 35 percent of the market.
Ukraine and Russia have had a complex dispute over gas prices for years, which blew up when the two countries became enemies after a pro-Russian leader of Ukraine was toppled in 2014. Moscow responded that year by seizing Ukraine's Crimea peninsula and backing pro-Russian separatists in eastern Ukraine, where fighting has killed 10,000 people.
In one of its rulings, the Stockholm court ordered Naftogaz to buy 5 billion cubic metres of gas from Gazprom a year from 2018. The March deliveries would have been the first time Ukraine bought gas directly from Russia since November 2015, when it started buying gas from Europe via so-called "reverse flows", to try to cut its energy dependency on Moscow.
Last year, Gazprom supplied a record high 194 billion cubic metres of gas to Europe, excluding former Soviet states and Turkey. Transit of Russian gas jumped by almost 14 percent to 93.5 bcm via Ukraine.
A Gazprom spokesman did not respond to a request to comment on possible risks to the Russian gas exports to Europe. (Writing by Vladimir Soldatkin and Alessandra Prentice Editing by Katya Golubkova and Peter Graff)