A Seychelles coastguard vessel has opened fire on Somali pirates holding six of its nationals and 21 Iranians during a daring high-seas military raid in the Indian Ocean.

Seychelles transport and environment minister Joel Morgan says the six Seychellois fishermen are safe, while the Iranians and the pirates were also rescued.

He says six fishermen were captured by Somali pirates south-east of the archipelago's main island of Mahe over the weekend and transferred to an Iranian dhow that was earlier captured with its crew of 21.

"We got confirmation of that at approximately 9:00am yesterday (local time). We established a rescue mission," he said.

The coastguard vessel, Topaz, set sail on Sunday with a Somali translator on board and reached the hijacking situation early Monday, as the pirates were 255 nautical miles north-west of Mahe, heading towards Somalia with the Seychellois ship - the Galate - in tow.

Mr Morgan says the pirates ignored the coastguards' audio calls to release their hostages and likewise did not alter their course when warning shots were fired.

"We took the decision to open fire on the engine compartment. Ten thousand 12.7 millimetre rounds were fired ... and we continued our harassment operation until we achieved what we wanted, which was to set fire to the engine," he said.

Mr Morgan says all on board had to jump off the boat.

- AFP