Thirtyone people have died after an Indonesian ro-pax took on water off Sulawesi on Tuesday.

The captain of the 749-gt Lestari Maju (built 1988) managed to ground the ship on a reef to help the evacuation of more than 100 passengers, Reuters reported.

It had got into difficulty in stormy seas.

The national search and rescue agency said the vessel had 164 passengers and crew on board.

Three were still missing, but 130 were rescued, a transport ministry official said.

There were also 48 vehicles on the ferry.

“The captain ran it onto a reef so it wouldn’t sink and to make the evacuation of passengers easier,” Agus Purnomo, director general of sea transportation, said in a statement.

“The captain and the owner of the ship were the last two people to come down from the passengership,” he added.

Images from television showed people hanging on to the listing vessel or wearing lifejackets in the water.

The ship is listed as owned by Pelayaran Lintas Benua.