Malaysia will turn away boats carrying desperate migrants from Myanmar and Bangladesh unless they are in imminent danger of sinking, a top coast guard official has said.

Malaysia's announcement on Wednesday makes it the second Southeast Asian country after Indonesia to refuse to allow migrants boats.

Indonesia's navy said a day earlier that it had turned away a fishing vessel packed with hundreds of migrants, and that it would not allow boats with Rohingya migrants in its waters.

Rohingya journey from Thailand to Myanmar

"The policy has always been to escort them out of Malaysian waters after giving them the necessary provisions," First Admiral Tan Kok Kwee of the Malaysian Maritime Enforcement Agency said on Wednesday on the resort island of Langkawi.

Abandoned at sea, thousands of Bangladeshis and members of Myanmar's long-persecuted Rohingya Muslim-minority appeared to have no place to go.

Smugglers fled wooden trawlers in recent days as fears grew of a massive regional crackdown on human trafficking syndicates, leaving migrants to fend for themselves.

The United Nations pleaded for countries in the region to keep their borders open and help rescue those stranded, while a group of parliamentarians slammed the "not-in my-back-yard" attitude.

Earlier this week, Malaysian authorities detained more than 1,000 migrants who arrived at the Malaysian island of Langkawi on boats.

Al Jazeera's Karishma Vyas, reporting from Langkawi island, said hundreds of migrants are being processed processed by Malaysia's immigration department. 

"These migrants need to be moved from Langkawi to detention facilities on the mainland but we're hearing these facilities are already overwhelmed by the number of people they've been asked to accomodate," she said.

Human rights activists have sharply reacted to Malaysia's decision to not allowed anymore crowded vessels to enter their waters, unless in distress.

"They say they are shocked to hear about this policy and it is tantamount to signing the death warrants of potentially thousands of desperate and very poor migrants who could still be out at sea," Vyas reported.

Thai government goes after human smugglers

Southeast Asia is in the grips of a humanitarian crisis, with around 1,600 migrants landing on the shores of the two Muslim-majority countries that over the years have shown the most sympathy for the Rohingyas' plight.

With thousands more believed to be in the busy Malacca Strait and nearby waters - some stranded for more than two months - activists believe many more boats will try to make land in coming days and weeks.

In the last three years, attacks on Rohingya have left 280 people dead and forced 140,000 others into crowded camps just outside Sittwe, the capital of Myanmar's Rakhine state, where they live under abysmal, apartheid-like conditions, with little or no opportunity for work.

That has sparked one of the biggest exoduses of boat people the region has seen since the Vietnam War, with an estimated 100,000 men, women and children boarding ships in search of better lives in other countries since June 2012, according to the UN refugee agency.

The first stop, up until recently, was Thailand, where migrants were held in jungle camps until their families could raise hefty ransoms so they could continue onward, usually to Malaysia. Recent crackdowns, however, have forced the smugglers to change tactics - instead holding people on small and large ships parked offshore until they collected around $2,000 per person.

Source: Agencies