An Australian inquest into the Christmas Island shipwreck has heard how the captain abandoned the boat a day before the tragedy.
The inquest was told passengers had been assured before they left Indonesia that the boat was in good condition.
But the engine stopped twice during the journey, including 200m from shore.
Up to 50 asylum seekers are believed to have died when the wooden vessel smashed into rocks off Christmas Island in heavy seas on 15 December last year.
Australia has an offshore immigration processing centre on the island - which lies in the Indian Ocean about 2,600km (1,600 miles) from the Australian mainland, but only 300km south of Indonesia.
Coastguards rescued 42 survivors - mainly Iranian, Iraqi and Kurdish asylum seekers - and recovered 30 bodies from the sea.
It is thought that up to 20 more people remain unaccounted for.
In opening statements, the inquest in Perth heard how the ill-fated journey was overseen by four Indonesian crewmen after the skipper abandoned the boat and was picked up by a trailing vessel.
One of the crewmen told authorities he was paid $1m rupiah (£72) to make the journey and was promised another $20m rupiah once the asylum seekers reached their destination.
The inquest was told that the boat's water pump had failed on approach to the island and the asylum seekers frantically attempted to bail out seawater.
The counsel assisting the Western Australian coroner said witnesses saw the passengers gather together and pray as the boat floundered in the rough seas.
Several people living on the island reported seeing thick black smoke blowing from the boats engines as it approached the rocky cliff face.
Counsel Malcolm McCusker said the asylum seekers had been told before leaving Indonesia that the boat was "ship-shape, that everything was organised and that everything would be supplied".
However, according to some passengers, the crew provided no safety instructions and there were not enough lifejackets.
Last week, a 40-year-old man was charged with 89 counts of people smuggling in connection with the tragedy.
Iranian-born Australian citizen Ali Khorram Heydakhani appeared in court in Sydney after being deported from Indonesia. He will be tried in Western Australia.
Three other men who were on board the boat have already been charged with "facilitating the bringing to Australia of a group of five or more persons".
The inquest continues.