Pirates attacked a German cargo ship in the busy Malacca Strait but quick action by the captain prevented the pirates from boarding, an international maritime watchdog said today.

"Pirates in a 12 meter wooden boat approached the German ship late Sunday," the head of the International Maritime Bureau's (IMB) Piracy Reporting Centre, Noel Choong, told AFP .

"One of the pirates wearing a mask attempted to board the ship," he added.

Maritime officials identified the ship as the "Agnes Scan".

Choong said the ship's captain raised the alarm and immediately carried out a zig-zag manoeuvre to prevent the pirates from boarding, adding that both Malaysian and Indonesian authorities have been informed about the incident.

The Malacca Strait - which runs between Indonesia and Malaysia and down to Singapore - was recently dropped from Lloyd's list of dangerous waterways.

Choong urged ships to maintain anti-piracy watches and to report any suspicious ships in the strait.