KUALA LUMPUR, Malaysia (AP) — Malaysian authorities said Friday that 27 Indonesians have been rescued after their boat overturned, but one person died and seven others are still missing.

Maritime Enforcement Agency official Mustapa Kamal Abas said in a statement that the boat was heading to Indonesia’s Batam island Thursday when its engine failed and it overturned after being hit by waves. The people on the boat were working illegally in Malaysia and thought to be returning home for the Muslim holy month of Ramadan.

Mustapa said that 28 people, including three women and an infant, hung on to the boat for 12 hours before being rescued by a tanker off Malaysia’s southern Johor state.

He said that one of the women died shortly after they were rescued, and that a search was under way for the missing.

Thousands of Indonesians work illegally in plantations and other industries in Malaysia. Many risk dangerous boat journeys when trying to return home.