A Somali pirate says the kidnapped crews of two Egyptian fishing vessels have won their freedom after attacking their pirate captors.

One of the pirates on board, who called himself Miraa, says the hostages overpowered them with machetes Thursday.  He said the Egyptian crews then seized guns from the pirates, killing two of his colleagues.

Shipping officials say the Egyptians are now in control of their ships and are heading home.

The pirates had held the Egyptian crews hostage since mid-April.

The case marks a rare instance of crewmen fighting back against Somali pirates who usually hold their hostages for months seeking large ransom payments.

In another development, a Turkish cargo ship evaded an attack by Somali pirates in the Gulf of Aden Friday.

Turkey's military says pirates had been following the cargo ship Elgiznur Cebi but gave up trying to capture it when a German helicopter led by NATO forces in the region reached the scene.

A flotilla of foreign naval vessels off Somalia has failed to slow the rampant piracy. 

Some information for this report was provided by AFP, AP and Reuters.