The boat was believed to have sunk shortly after midnight while trying to leave Malaysia illegally, said the agency's official, who declined to be named because he was not authorized to speak to the media.

He said that the Indonesians, including women and children, were believed to be heading home ahead of the start of the holy Muslim month of Ramadan.

The Malaysian official said that 31 people have been rescued so far. A ship and several boats were searching for survivors and a helicopter will soon be dispatched, he said.

No reason was immediately given for the accident.

Tens of thousands of Indonesians work illegally in plantations and other industries in Malaysia. They sometimes risk dangerous boat journeys to return home.