A Canadian warship helped thwart a pirate attack as part of the NATO mission to keep vessels safely moving in the Gulf of Aden, officials said Sunday.

HMCS Winnipeg responded Saturday night after seven pirates from Somalia approached a Norwegian-flagged tanker, NATO officials said.

The pirates' skiff fled after the crew of the MV Front Ardenne took evasive manoeuvres and alerted warships in the area, they said.

Cmdr. Chris Davies of NATO's maritime headquarters in England said the pirates then sailed into the path of HMCS Winnipeg, which was escorting a World Food Program delivery ship through the waterway.

The American warship USS Halyburton and a British naval supply ship  joined the Winnipeg in what became a seven-hour chase in the dark.

The two warships dispatched helicopters to keep track of the bandits and fired warning shots to stop them, Fernandes said. The pirates stopped, but not before dumping most of their weapons overboard.

The Canadian ship sent a boarding party to search the skiff and found a rocket-propelled grenade, said HMCS Winnipeg spokesman Michael McWhinnie.

Crew members interrogated, disarmed and released the pirates, he said.

With files from the Associated Press