About 250 desperate Rohingya refugees are afloat in the Andaman Sea after their attempt to land in Indonesia was rejected.

Their decrepit, overcrowded wooden boat reached western Indonesia on Thursday. However, after two other boats carrying about 350 refugees had docked in the northern region of Aceh earlier in the week, they were prevented from landing.

The third boat was met with resistance from locals in Bireuen, who refused to allow it to land and pushed the vessel back out to sea.

When the boat tried to land a second time – a little farther south at Muara Batu – and refugees staggered onto the beach, they were lined up and escorted back, witnesses said.

The mostly Muslim Rohingya are persecuted in Myanmar, and thousands risk their lives each year on long and expensive sea journeys, often in flimsy boats, to try to reach Malaysia or Indonesia.

Fishermen at the beach in Muara Batu handed some of the refugees packets of food and bottles of water, but the situation escalated late into the evening.

Men, women, children and babies could be seen looking to shore as angry locals told them not to land the boat, which some on board said had sailed from Bangladesh.

Young men on board held their arms out in exasperation as the open-topped boat listed to one side due to overcrowding.

Local Acehnese delivered food in the hope those on board would decide to move on, according to Mukhtaruddin, village head of Pulo Pineung Meunasah.

The passengers, however, were insistent after almost three weeks at sea.

After climbing down ropes to swim to shore and appeal to the Acehnese, one Rohingya man covered in plasters lay on the sand barefoot and shirtless, appearing almost lifeless.

The rest of Thursday’s arrivals were still waiting on the boat about 100 metres (110 yards) from the beach, Mukhtaruddin said.

Rohingya refugee Manzur Alam said the boat had left Cox’s Bazar in Bangladesh – home to almost a million Rohingya refugees – 20 days ago with 249 people on board.

Mukhtaruddin estimated “between 250 and 260” refugees were on the boat or the beach.

Three people, including Alam, gave different passenger breakdowns but all said mostly women and children were on board.

“There are many babies, little children. Please protect them. They are very hungry because they didn’t get anything,” said Alam, 23.

Some of the Rohingya men straddled the vessel’s sides, using their hands to shield their faces from the sun as they looked for answers on shore.

A Rohingya girl could also be seen cupping her hands upward in a gesture of prayer.