European Union naval forces have rescued 24 sailors from a Maltese-flagged oil tanker that was attacked by pirates off the coast of Somalia.

The Hellas Aphrodite, carrying petrol from India to South Africa, was seized on Thursday when armed pirates opened fire with machine guns and rocket-propelled grenades before boarding the vessel.

The crew locked themselves inside a fortified citadel while the attackers took control of the ship.

A Spanish warship, the ESPS Victoria, operating under the EU's anti-piracy mission Operation Atalanta, reached the tanker on Friday afternoon. Special forces boarded the vessel and found all 24 crew members unharmed.

The crew is safe and no injuries have been reported. Throughout the incident, they remained in the citadel in direct contact with Atalanta, the EU mission said, adding that a show of force had prompted the pirates to abandon the ship before the warship arrived.

Despite the successful rescue, the threat risk in the area remains critical as the pirates are still in the vicinity.

The rescue operation involved a helicopter, drone, and surveillance aircraft. Hours earlier, another ship in the region was approached by a small speedboat but managed to evade it.

This incident is part of a concerning trend of increasing piracy in the area, despite previous successes in reducing such incidents through international naval patrols and security measures.

Attacks by Yemen's Houthi rebels on vessels in the Red Sea have further complicated matters, leading to a diversion of shipping routes and creating opportunities for Somali piracy.

According to the International Maritime Bureau, there were seven reported incidents of piracy off Somalia's coast last year, including three hijackings. There was only one incident reported in 2023.