MOSCOW (Reuters) - A court in Moscow ruled on Wednesday to keep 24 Ukrainian sailors captured by Russia off the coast of Crimea in custody for a further three months despite recent talks between Moscow and Kiev on a possible prisoner swap.

Russia captured three Ukrainian vessels and their crews in November 2018 in territorial waters that separate Crimea, which Moscow annexed from Ukraine in 2014, and Russia.

Moscow accuses the sailors of illegally entering Russian waters, something Kiev denies.

Wednesday’s court hearings were being closely watched after a senior Ukrainian official said on Tuesday that an agreement had been reached between Moscow and Kiev to exchange prisoners over the next month.

President Vladimir Putin and Ukraine’s newly elected President Volodymyr Zelenskiy discussed a possible return of prisoners when they spoke by phone for the first time last week.

Ukraine’s foreign ministry protested the Moscow court rulings in a statement, saying that they complicated already tense relations between the countries and contravened a ruling by the International Tribunal for the Law of the Sea.

The Hamburg-based tribunal said in May that Moscow should release the sailors immediately. The Kremlin rebuffed that call saying the court did not have jurisdiction to make the ruling.

Ties between Russia and Ukraine have been in crisis since Crimea’s annexation in 2014 and the outbreak that same year of a pro-Russian separatist uprising in eastern Ukraine.

Kiev’s forces have been battling the separatists since then in a conflict that has claimed more than 13,000 lives. Sporadic fighting continues despite a ceasefire agreement.