It came down to the wire but it seems that Ukraine, Russia and Europe have avoided a full-out gas disaster.
Ukrainian authorities have agreed to pay $786 million to settle some debts for Russian gas imports. The deal ensures Russia's state-owned Gazprom ( will continue delivering critical natural gas supplies to Ukraine and, in turn, )Europe.
Ukraine and Russia were tied in a massive gas dispute. Russia accused Ukraine of owing billions in unpaid bills and threatened to cut off supplies starting in June. Europe was caught in the mess because roughly 15% of Europe's gas demand is supplied by Russia via Ukrainian pipelines.
After a week of intense talks between the three sides, they reached a partial agreement, with Ukraine's $786 million payment covering two months worth of gas supplies, showing Russia the country was serious about settling its debts.
Russia's energy minister Alexander Novak said that once the payment arrives Monday, talks will resume to settle the dispute over Ukraine's gas bills for an additional four months. They are also working to agree on the price of future gas deliveries.
The talks were held in an attempt to avoid a repeat of gas cuts caused by previous disputes between Russia and Ukraine in 2006 and 2009.
The gas dispute between Moscow and Kiev comes as violence flares in parts of eastern Ukraine between government forces and pro-Russian militants. Russia has been accused of stoking separatist tensions in Ukraine.
According to U.S. intelligence, 10,000 Russian troops are still standing at the border between the two countries, but in the last several days about 30,000 Russian troops moved back to their home bases.
Ukraine had been running out of money to pay its gas bills and was facing bankruptcy early this year. The key reason it is now able to repay its debts is through assistance from the International Monetary Fund, the World Bank, the European Union and the U.S. government.
--CNN's Barbara Starr contributed to this report.