Ten Indonesians on Tuesday admitted a pirate attack on a Malaysian-owned tanker when they appeared in a Alor Star court in Kedah, Bernama news agency said.

It said the 10, mainly from the tsunami-hit province of Aceh and who were not represented by lawyers, admitted that they carried out the attack armed with machetes.

They are Lukman Daim, 34; Johan Arifin, 43; Ruatam Pangabean, 57; Ismail Ataleb, 24; Irfan Muluna Adam, 24; Junaidi Abdul Rahman, 28; Hashim Adam, 25; Mukalis M. Ali Omar, 28, Wisnu Probowo, 33 and Afizal Razali, 26.

They face up to 20 years in jail and caning when sentenced on July 10.

The Nepline Delima tanker, which was carrying diesel from Malaysia's Port Klang to Burma, was boarded before dawn off the northern island of Langkawi in the Malacca Straits earlier this month.

The attack was foiled when a quick-thinking crewman from the tanker leapt into the robbers' boat and sped off in it to fetch the police.

The Malacca Straits is one of the world's most important waterways, with 50,000 ships carrying about one-third of world trade passing through it each year.

However the strait, 960 kilometres long and 1.2 kilometres wide at its narrowest point, is notoriously vulnerable to pirate attacks and governments in the region also believe it is tempting for terrorists.

In an effort to stem attacks, the governments of Malaysia, Indonesia and Singapore have launched co-ordinated patrols.