Representatives from Moscow and Kiev met in Berlin for talks sponsored by the EU on future gas deliveries of Russia, which is worried about being left in the rain by a major new pipeline.
Ukraine is concerned that the planned Nord Stream 2 Baltic Stream 2 pipeline from Russia to Germany, which will geographically bypass, will remain politically isolated and will lose significant transit taxes.
US President Donald Trump has interfered in the dispute, charging the gas pipeline would make Germany increasingly a "prisoner of Russia", while the United States would compete in Europe with loads of liquefied natural gas (LNG) tanks.
The Russian gas giant Gazprom has already drastically reduced the flow of gas through Ukraine, where from the annexation of Crimea to Russia in 2014, an armed conflict broke out against the pro-Moscow rebels.
Gazprom and its partners plan to complete Nord Stream 2 by the end of next year, effectively doubling Russian shipments crossing the existing Nord Stream 1 line.
Another project, which will be completed by the end of 2019, the Turkish electricity pipeline, is likely to further reduce the traditional role of Ukraine as an important gateway for Russian gas to Europe. .
The Nord Stream 2 plan has fueled fears in the EU, and in particular in Eastern Europe, that too much reliance should be placed on the gas of a hostile Russia that could use energy exports to exert political influence.
In previous disputes, Russian deliveries to European markets in 2006 and 2009 were temporarily halted temporarily in the middle of winter.
"The clock is ticking"
The talks in Berlin brought together Russian energy minister Alexander Novak, Ukrainian foreign minister Pavlo Klimkin and European Commission vice-president, Energy Maros Sefcovic, as well as representatives of Gazprom and their Ukrainian counterpart Naftogaz.
"Time is running out, the end of 2019 is coming and we have to answer this question," said Sefcovic. "On January 1, 2020, will we have a meaningful agreement for transit through Ukraine that is economically viable?"
Trump weighed in the dispute last week and attacked Chancellor Angela Merkel accusing NATO allies: "Germany is trapped in Russia because it draws so much energy from Russia".
During his meeting in Helsinki on Monday with Russian President Vladimir Putin, Trump reiterated that the United States, thanks to its energy boom in Europe, could increasingly compete by selling LNG.
Although LNG shipped through the Atlantic is economically less profitable, Trump expressed the hope that "we will succeed in the competitive arena" and recognized that Russia has "a small position advantage".
Putin was conciliatory, saying that Russia is ready to keep transit through Ukraine after the Nord Stream 2 has been activated and the transit agreement has been extended beyond 2019.
The Russian leader added that this would have been possible if Gazprom and Naftogaz had to resolve their dispute over an arbitration court in Stockholm.
Germany, the largest European economy, has long insisted that Nord Stream 2 is a purely "commercial" project and that it has eliminated the last obstacles to its construction in March.
However, under the increasing pressure from Western allies, in April Merkel stressed that Ukraine should not be isolated and continue to play a key role in the transit of gas to Europe.
Merkel's Minister of Economy, Peter Altmaier, stated that the aim of Tuesday's talks was "a reliable long-term solution that satisfies the interests of both parties and, above all, responds to concerns about security of Ukraine ".
"It was not easy for Ukraine to negotiate with Russia, especially since 2014," he said, adding that "there was a lot of mistrust and complaint".
Ukrainian President Petro Poroshenko has in the past invited Germany to abandon plans to build Nord Stream 2, warning that this would mean an "economic and energy blockade" in his country dominated by the crisis.
European demand for natural gas has been on the rise since 2015, mainly due to the drop in production in the Netherlands.
Russia has the largest natural gas reserves in the world with its huge Siberian gas fields, and last winter Gazprom brought exports to Europe at record levels in particularly cold weather conditions.