PIDIE - Rohingya Muslims who survived a harrowing 40 days on a boat across the Indian Ocean to end up in Indonesia have recounted stories of hunger and desperation, saying more than 20 of those on board died on the way.

A boat that washed ashore in Indonesia's Aceh province on the island of Sumatra on Monday was carrying 174 Rohingya, most of them dehydrated, fatigued and in need of urgent medical care after weeks at sea, local disaster agency officials said.

One of the survivors, Shafiq Rahman, said 200 people had set sail on a small boat from Bangladesh in an attempt to reach Muslim-majority Indonesia, and 26 of them died at sea.

"We were afloat in the sea for 40 days," he said, adding that food supplies grew thin after 10 days and the rickety boat soon sprang a leak.

"We reached this place safe and sound by grace of Allah," he said in a temporary shelter in Pidie district, where dozens of people were hooked to intravenous drips as medics attended to their needs, while a woman was seen fanning sleeping children using a piece of cardboard.

The Rohingya are a Muslim people from mainly Buddhist Myanmar, where they have long suffered repression. Around 800,000 have fled to Bangladesh since 2017, and thousands have fled to destinations further afield across southeast Asia.

Shafiq and others came to Indonesia to better their lives and find an opportunity to study, he said.

Another survivor, Samusa Khatun, said she came to Indonesia to escape destitution and find a job.

Theirs was the latest in a series of boat landings and rescues around the region in recent weeks, as Rohingya flee desperate conditions in Bangladeshi refugee camps and persecution in Myanmar in increasing numbers.

One boat carrying 180 people is believed to have sunk in early December, with all on board presumed dead, according to rights groups. The UNHCR on Monday said 2022 could be one of the deadliest years at sea in almost a decade for the Rohingya.

Rohingya attempting sea crossings to Thailand and Muslim-majority Malaysia and Indonesia often set off between November and April when seas are calmer.

Indonesia has seen nearly 500 Rohingya reach its shores in the past six weeks, according to the UN refugee agency UNHCR. The security ministry said in a statement on Tuesday the government was working with the International Organisation for Migration and the UNHCR to move the Rohingya into shelters in nearby cities.

(Additional reporting by Stanley Widianto; Editing by Kanupriya Kapoor and Peter Graff)