Indonesia and Malaysia have agreed to provide temporary shelter to thousands of migrants stranded at sea, the first breakthrough in the humanitarian crisis confronting south-east Asia.

The announcement was made by Malaysian foreign minister Anifah Aman after a meeting with counterparts from Indonesia and Thailand, called to address the plight of the migrants.

Most of them are the persecuted Rohingya Muslim minority from Burma and others are Bangladeshis fleeing poverty.

The agreement came as more than 430 migrants who had been stranded at sea for months were rescued and taken to Indonesia.

They were rescued by fishermen manning more than a dozen boats. An initial batch of 102 people were the first brought to shore in the village of Simpang Tiga in Indonesia's eastern Aceh province.

"Indonesia and Malaysia agreed to continue to provide humanitarian assistance to those 7,000 irregular migrants at sea," Mr Anifah told reporters.

He said the two countries "also agreed to provide them temporary shelter provided that the resettlement and repatriation process will be done in one year by the international community".

"In the meantime, Malaysia and Indonesia invite other countries in the region to join in this endeavour," he said.

A few thousand migrants have already made it to shore in Aceh and Malaysia's Langkawi island.

Most of the victims are believed to be victims of human traffickers, who recruit them in Burma's Sittwe province and in Bangladesh with promises to give them safe passage to Malaysia, and jobs once they land there.

In reality, they are held for ransom, either on the trawlers or in jungle camps in Thailand through which they transit before slipping into neighbouring Malaysia. The victims then have to ask their relatives back home to give money to the smugglers in return for their release.

"The enforcement agencies of the countries concerned will continue to share intelligence information in their efforts to combat people smuggling and human trafficking," Mr Anifah said.

He also urged the international community to "uphold their responsibility and urgently share the burden of providing the necessary support to Malaysia, Indonesia and Thailand in addressing the problem".

He said the three countries propose that the international community should provide them with financial assistance to enable them to help the migrants who would be sheltered in a designated area to be agreed by the affected countries and administered by a joint taskforce.

In Indonesia, Khairul Nove, head of Langsa Search and Rescue Agency, said the first batch of 102 migrants, including 26 women and 31 children, were suffering dehydration and were weak and starving.

One of the migrants, Ubaydul Haque, 30, said the ship's engine failed and the captain fled and that they were at sea for four months before the fishermen found them.

"We ran out of food, we wanted to enter Malaysia but we were not allowed," he said.

One of the fishermen who led the rescue was Razali Puteh, 40. He said he spotted a green wooden trawler crammed with people who were screaming and waving their hands and clothes to get his attention.

As he neared the trawler, people aboard began jumping into the water, trying to reach his boat. He said he asked them to stay on their boat, which apparently had no motor, and promised to return with help. He returned with other fishing boats and brought the migrants to shore.

The foreign ministers of Malaysia, Indonesia and Thailand also promised to take necessary action against human traffickers who have been driving the exodus of Burma's Rohingya Muslims.

Mr Anifah said the three nations will take steps to bring the perpetrators to justice.

Thailand has already arrested several police and local officials after authorities uncovered jungle camps where the trafficked Rohingya had been held until their families agreed to pay ransoms for their release.