Thousands of migrants have arrived in Indonesia and north-west Malaysia over the past week. Finally on land after being abandoned at sea, they are being held in detention centres until the authorities decide what to do with them.

Tensions between Rohingya and Bangladeshi migrants at a shelter in Aceh have led to them being separated into two separate groups to prevent fights from breaking out. A barbed wire partition was put up to keep the two groups apart.

"They keep fighting and quarrelling with each other and they are not compatible with each other. That is why we have separated them. So the Myanmar people are here and the Bangladeshis are there to avoid anything bad from happening," said Sunarya, head of Langsa police.

rohingya migrants Indonesia
Bangladeshi migrants stand near a barbed wire barrier at a shelter in Kuala Langsa, in Indonesia's Aceh ProvinceBeawiharta/Reuters
rohingya migrants Indonesia
An Indonesian policeman holds his rifle as Rohingya migrants,look for suitable garments in a pile of donated clothes at a temporary shelter in Kuala LangsaBeawiharta/Reuters
rohingya migrants Indonesia
Bangladeshi migrants look out of a barred window at an immigration detention centre in Lhokseumawe, Aceh provinceChaideer Mahyuddin/AFP
rohingya migrants Indonesia
Rohingya women look out through the window of a temporary shelter in Kuala Langsa, Aceh provinceUlet Ifansasti/Getty Images
rohingya migrants Indonesia
An Indonesian official sprays insecticide for mosquitoes at a shelter in Kuala Langsa, in Indonesia's Aceh ProvinceBeawiharta/Reuters
rohingya migrants Indonesia
A rescued Bangladeshi migrant prays while Indonesian authorities fumigate a warehouse converted into sleeping quarters for migrants at a fishing port in Langsa in Aceh provinceRomeo Gacad/AFP
rohingya migrants Indonesia
Rescued migrants walk in a fenced-off area of the fishing port of Kuala Langsa in Aceh provinceRomeo Gacad/AFP

Both Rohingya and Bangladeshi migrants have blamed each other for fights that broke out onboard their boat. About 100 people are believed to have died in a deadly fight involving axes, knives and metal bars after traffickers abandoned them at sea.

rohingya migrants Indonesia
Scars are seen on Bangladeshi migrant Mohammad Murad Hussein's head and body, He said he was attacked and badly beaten by Rohingya migrants in a desperate fight for food aboard the boat before they were rescued by Indonesian fishermenRomeo Gacad/AFP
rohingya migrants Indonesia
Rohingya migrant Asina Begun is photographed for identification purposes by Indonesian police at the port in Langsa. She said her brother was attacked and killed by Bangladeshi migrants in a desperate fight for food aboard their boat before they were rescued by Indonesian fishermenRomeo Gacad/AFP
rohingya migrants Indonesia
Rohingya migrant Mohammad Amih speaks about incidents when Rohingya migrants were attacked by Bangladeshis over food onboard their boatRomeo Ranoco/Reuters

Many of the migrants are Bangladeshis who set sail seeking jobs and a better life. The others are Rohingyas, a stateless people who have escaped persecution in Myanmar.

Work is under way to determine the migrants' identities so they can be processed as refugees or be repatriated back to their home countries.

"For the Myanmar people or ethnic Rohingya, we will wait for the order from our superior to place them in the immigration detention centre. As for the Bangladeshi the embassy has already come and taken data from them and they will cross-check with Bangladesh and will do the repatriation," said immigration official Cut Anna Darmawan.

rohingya migrants Indonesia
Indonesian immigration officers register a Rohingya woman inside a temporary shelter in Kuala Langsa, in Indonesia's Aceh ProvinceBeawiharta/Reuters
rohingya migrants Indonesia
Migrants register for an Indonesian police identification process inside the confinement area in the fishing port of Kuala Langsa in Aceh provinceRomeo Gacad/AFP
rohingya migrants Indonesia
Rohingya migrants pose for identification purposes at a temporary shelter in Kuala Langsa, Aceh province. From left: Bibi Zuhu Ara, Asma Bibi, aged 3, and Zaik HuseinUlet Ifansasti/Getty Images

Officials have used loudspeakers to appeal to local people living near the shelter in Aceh not to get too close to the migrants, fearing they could spread disease. But people have ignored the orders.

Hundreds have thronged the two warehouses where the migrants have been housed since their arrival, bringing rice, instant noodles, clothing and home-cooked meals.

rohingya migrants Indonesia
A local Acehnese woman greets rescued migrants at an immigration detention centre in LhokseumaweChaideer Mahyuddin/AFP
rohingya migrants Indonesia
Indonesian volunteers carry donated goods to a warehouse converted into sleeping quarters for migrants at a fishing port in Langsa in Aceh provinceRomeo Gacad/AFP
rohingya migrants Indonesia
Volunteers cook for migrants at a temporary shelter in Kuala Langsa, Aceh provinceUlet Ifansasti/Getty Images

Indonesia has "given more than it should" to help the Rohingya and Bangladeshi migrants, its foreign minister has said. Retno Marsudi said she will meet with Malaysian and Thai officials to discuss how to solve the migrant problem with help from their countries of origin, the UN refugee agency and the International Office for Migration.

Marsudi said Indonesia has sheltered 1,346 Rohingya and Bangladeshi migrants who washed on to Aceh and North Sumatra provinces earlier in May. The first group came on 10 May with 558 people on a boat, while the second with 807 on three boats landed on 15 May.

Even before the crisis, nearly 12,000 migrants were being sheltered in Indonesia awaiting resettlement, she said, with most of those Rohingya Muslims who have fled persecution in Buddhist-majority Myanmar. No more than 500 of those migrants are resettled in third countries each year.

rohingya migrants Indonesia
A Bangladeshi migrant sits inside a shelter after having a haircut in Kuala LangsaBeawiharta/Reuters
rohingya migrants Indonesia
Rahana Begum, a Rohingya migrant who arrived in Indonesia by boat, cries while holding her child as they wait for medical treatment at a temporary shelter in Kuala LangsaBeawiharta/Reuters
rohingya migrants Indonesia
A Rohingya boy plays with a ball at a shelter in Kuala Langsa, in Indonesia's Aceh ProvinceBeawiharta/Reuters
rohingya migrants Indonesia
A Rohingya child receives vitamins from a medical worker from the International Organisation for Migration inside the confinement area in the fishing port of Kuala Langsa in Aceh provinceRomeo Gacad/AFP
rohingya migrants Indonesia
A Rohingya migrant has an improvised shower at a temporary shelter in Kuala Langsa, Aceh provinceUlet Ifansasti/Getty Images
rohingya migrants Indonesia
A Rohingya woman rests with children at a temporary shelter in Kuala Langsa, Aceh provinceUlet Ifansasti/Getty Images

The migrants who have made it this far just want better lives. "Whether I stay in Indonesia or Malaysia it doesn't matter, or even Australia or America. All I want is to get a job and find something to eat," said Muhammad Amin.

Thousands of migrants are believed to be stranded on similar boats in Southeast Asian seas as governments in the region seek to prevent them from landing, despite a request by the United Nations to rescue them. The United Nations said the deadly pattern of migration by sea across the Bay of Bengal would continue unless Myanmar ended discrimination.

Malaysia, Indonesia and Thailand have all turned or towed overcrowded migrant boats away from their shores in recent days, in what the IOM has described as "maritime ping-pong with human lives".