Ukraine’s foreign minister said a drone attack on a Russian military vessel and a cargo ship in Libyan waters over the weekend was a legitimate act of self-defence, after criticism from the government in Tripoli.

Andrii Sybiha said Russian naval vessels and cargo ships transporting military equipment were valid targets. He said Ukraine’s right to self-defence was enshrined in Article 51 of the United Nations charter.

Libya’s Tripoli-based Government of National Unity condemned the Ukrainian operation on Monday, saying it sank the Russian naval corvette Merkury at the eastern port of Benghazi. The government said Libya would not accept being drawn into the Russia-Ukraine conflict.

Benghazi is controlled by military commander Khalifa Haftar, whose Libyan National Army has ties with Russia. The internationally recognised Government of National Unity controls western Libya.

“Ukraine is not 'dragging' anyone into the war or 'transferring' the war anywhere,” Sybiha said on the Telegram messaging app. “Ukraine respects the sovereignty and territorial integrity of Libya. We emphasize that Ukraine's actions are ⁠aimed ​at countering Russian armed aggression and ⁠are not intended to harm Libya or its people.”

Sybiha said international law does not restrict the right to self-defence to the territory where aggression occurs; it can also be exercised on the aggressor’s territory or in international waters. He said Russia was endangering third countries by using their civilian infrastructure for military purposes.

The Institute for the Study of War said the Russian corvette had stopped for several days at Benghazi port to refuel and resupply under a cooperation agreement. It was escorting cargo ships that can carry military supplies to Russia.

The eastern government in Benghazi said on Monday there were indications the naval drones had been launched from western Libya. It asked the UN to investigate allegations that Ukraine had deployed military experts there.

Russia’s defence minister has not publicly commented on the attack. In an interview published on Tuesday, Ukrainian President Volodymyr Zelenskiy confirmed Ukraine was responsible for a separate drone strike on Saturday against a Russian cargo vessel in international waters in the Gulf of Finland.

Zelenskiy said the vessel, Sparta II, was a legitimate target because it was carrying weapons. Russia’s Transport Ministry said on Tuesday the damaged ship had been towed back to the Russian port of St Petersburg.