MOSCOW — Russian and Ukrainian gas companies say they have finalized a slew of contracts ensuring uninterrupted transit of Russian natural gas to Europe.

Ukraine’s President Volodymyr Zelenskiy hailed the agreements that were signed this week, saying they will allow Ukraine to get at least $7 billion in transit payments from Russia over the next five years.

Zelenskiy said on Facebook the documents ensured Ukraine’s “energy security and well-being” and let “Europe know that we won’t fail it when it comes to energy security.”

The deal came shortly before the previous transit contract expired late Tuesday and eases European fears of an interruption in Russian gas supplies.