Rohingya migrants
Migrants believed to be Rohingya rest inside a shelter after being rescued from boats at Lhoksukon in Indonesia's Aceh Province May 11, 2015.Reuters

Malaysia detained 1,018 Bangladeshi and Rohingya refugees after they arrived in three boats on Monday, police said, a day after Indonesian authorities rescued 600 stranded off the coast of Aceh.

More than 100,000 stateless Rohingya Muslims have fled violence and poverty in Myanmar since 2012. Most travel in traffickers' boats to Thailand, where they are held by traffickers in squalid jungle camps before a ransom is paid.

Police in the northwest Malaysian island of Langkawi said three boats arrived in the middle of the night to unload the refugees, but only one boat was discovered after it got stuck on a breakwater, Langkawi police chief Harrith Kam Abdullah told Reuters.

Some 555 Bangladeshis and 463 Rohingya, including 99 women and 54 children, landed illegally and would be handed to the immigration department, he added.

An estimated 25,000 Rohingya and Bangladeshis boarded people smugglers' boats in the first three months of this year, twice as many in the same period of 2014, the U.N. refugee agency UNHCR has said.

Malaysia, one of Southeast Asia's wealthier economies, has long been a magnet for illegal immigrants from poorer countries in the region.