Nairobi: Security forces from Somalia's semiautonomous Puntland region stormed a hijacked cargo vessel early yesterday and outgunned the pirates holding it after they fatally shot the ship's Pakistani captain, authorities said.

Authorities decided to try and free the Panama-flagged ship by force after pirates refused pleas to surrender and instead killed the captain, said Saeed Mohammad Raage, who is the minister of marine transport and ports in the region.

"We can't afford letting pirates capture Somali-charted ships. If we don't act so decisively, they will continue hijacking all Somali-bound cargo ships," Raage said.

Two officers were wounded during a brief shootout with the pirates and ultimately all seven pirates were detained, he said.

While rescue operations by Somali security forces are rare, it's not the first time they have tried to free a ship. In 2008, they stormed a hijacked ship carrying food to the war-ravaged, poor country, rescuing the hostages and arresting seven pirates.

The QSM Dubai was hijacked early on Wednesday in the Gulf of Aden while headed for a port in the breakaway northern region of Somaliland. The crew aboard the ship hailed from Egypt, Pakistan, Bangladesh and Ghana. It had sailed from Brazil and carried goods for both Somaliland and Puntland regions.