Nine people were missing after a boat carrying 27 Indonesian workers overturned on Thursday off Malaysia’s west coast, the country’s maritime agency said, in the second such accident in two days.

On Wednesday, an overcrowded wooden boat carrying Indonesian migrants home sank in choppy seas, with 23 people still missing. Eleven people were confirmed dead and at least 63 survived.

Maritime agency official Hamid Mohamad Amin said the second boat capsized early on Thursday in rough seas about 20 kilometres off Sepang town on the outskirts of Kuala Lumpur. He said 18 people, including four women, were rescued by passing merchant ships but nine others were still missing.

One of the survivors was injured seriously and was hospitalised.

Tens of thousands of Indonesians work without legal permits in plantations and other industries in Malaysia, and they travel between the countries by crossing the narrow Strait of Malacca, often in poorly equipped boats.

On Wednesday, a boat with 97 Indonesians capsized about 4 kilometres from shore on the outskirts of Kuala Lumpur while trying to leave Malaysia illegally for Aceh province in Indonesia.

District maritime official Mohamad Hambali Yaakup said several dozen vessels and a helicopter were scouring the area Thursday for the 23 missing people.

The survivors, including 12 women and a child, were rescued at sea or found on land after they swam to safety. Two women and nine men were among the dead.

Indonesian Ambassador Herman Prayitno told local media late Wednesday that the migrants on the boat to Aceh had paid up to $373 each for the trip back to Indonesia to celebrate Ramadan. He said the boat was overloaded.

“It is a sad tragedy,” he said. “Many of them were in the country illegally as their tourist visas had expired and they had overstayed. They were finding work here but were on their way back to Indonesia for Ramadan.”