A merchant vessel was attacked in the Gulf of Aden, offshore Somalia, while transiting the area on Tuesday, according to the United Kingdom Maritime Trade Operations (UKMTO).
Shots were fired at the unnamed ship from a skiff that tailed the vessel.
However, as the armed guards on board the ship returned fire, the attackers abandoned their plan of boarding the vessel and fled.
The captain of the ship confirmed to UKMTO that the vessel was safe. There have been injuries reported to the crew.
UKMTO warned the vessels transiting the area to exercise caution.
The number of piracy incidents off the Somali coast has declined, largely due to the presence of international naval forces in the region.
The latest attack reported off Somalia was in February this year when Singapore-flagged oil/chemical tanker MT Leopard Sun was attacked, some 165 km off the central coast of Somalia.
The tanker was approached by three skiffs and was fired upon by armed pirates. The armed security team on board the vessel returned fire, scaring off the pirates and preventing them from boarding the ship.