A Canadian warship intervened on Friday to protect two ships under attack by pirates off the coast of Somalia in the latest action in the troubled waters near the Horn of Africa.

A Sea King helicopter is seen hovering aft of HMCS Winnipeg. ((CBC)) The thwarted assaults took place in the Gulf of Aden — a beehive of activity for piracy in recent years.

The first frantic distress call reached HMCS Winnipeg soon after the captain of a cargo ship spotted a speed boat closing fast, the CBC's David Common reported from aboard the Canadian navy's multi-role patrol frigate.

Within a minute of the call, the pirates opened fire on the ship with rocket-propelled grenades.

HMCS Winnipeg, which is participating in a NATO counter-piracy operation, went to full speed and dispatched its armed Sea King helicopter to the scene about 100 kilometres away.

"This is clearly an act of piracy if the merchantmen said they saw rocket-propelled grenades fired at them," the ship's captain, Cmdr. Craig Baines, told CBC News.

HMCS Winnipeg has disrupted numerous pirate attacks on vessels off the coast of Somalia and in the Gulf of Aden. ((CBC)) The pirate boat turned away from the cargo ship and moved toward an American container vessel, whose captain stayed in constant contact with the Canadian sailors.

An Italian warship that was closer to the American vessel also launched its helicopter, which teamed up with the Sea King to stop the pirate vessel.

The pirates gave up and threw their weapons in the water just before the Italians boarded their vessel — which pirates often do when confronted, Common said.

The international community has increased naval patrols in the Gulf of Aden to counter the growing scourge of piracy off Somalia's coast.

Last month, a team of U.S. Navy SEAL snipers killed three pirates holding an American captain hostage on a lifeboat after a foiled hijacking of his cargo vessel, the Maersk Alabama.

On Thursday, Defence Minister Peter MacKay said Canada is in negotiations to have Kenyan authorities prosecute pirates apprehended by the Canadian navy — a shift in current policy to counter the threat of what MacKay called "financial terrorism."

Pirates intercepted by Canadian forces off the coast of Somalia until now have been disarmed and then released, a policy that has sparked criticism from legal experts.

The Canadian government has maintained it cannot prosecute pirates captured by Canadian Forces, as it lacks jurisdiction under international law.