Attackers have boarded a ship off the coast of Somalia after firing machine guns and rocket-propelled grenades at the vessel, according to a UK maritime agency.

Greek shipping company Latsco Marine Management confirmed the attack on a ship carrying gasoline, stating that all the ship's 24 crew were 'safe and accounted for' and 'we remain in close contact with them'.

The crew have taken shelter in the ship's fortified safe room, Reuters news agency quotes an official from maritime security company Diaplous as saying.

European Union naval forces operating in the area have been asked for assistance, Reuters reports.

The United Kingdom Maritime Trade Operations (UKMTO) mentioned that the raid happened about 560 nautical miles south-east of the Somali town of Eyl.

'An approach was reported by one small craft on its stern, which then fired small arms and RPGs towards the vessel,' UKMTO stated.

Private security firm Ambrey suggested that the attackers were likely Somali pirates, who have been active in the region recently.

The attack on the Malta-registered vessel, called Hellas Aphrodite, occurred at around 11:48 local time (08:48GMT), as it traveled from Sikka, India, to Durban, South Africa. Latsco has activated its emergency response team and is coordinating with authorities to ensure the crew's continued safety.

The resurgence of piracy in this area is alarming, especially as reports indicate at least seven incidents last year and several fishing vessels have already been seized by pirates this year, according to the International Maritime Bureau.