Once one thousand carpenters unable to meet their debts, built a ship, and sailed away until they came to a fertile island. There they found a castaway, from whom they learned that the island was safe and fruitful. So they stayed there, and, as time went on, they grew fat and began to drink toddy made from sugar cane.
The deities, incensed because the island was being fouled with their excrement, decided to send a wave up to drown them. A friendly deity, wishing to save them, gave them warning; but another cruel deity asked them to pay no heed to her words. Five hundred of the families, led by a wise man, built a ship in which they placed all their belongings in case the warning should prove true. No harm would be done should it prove false. The others, led by a fool, laughed at them. At the end of the dark fortnight the sea rose; the five hundred wise families escaped, the others were drowned.
The story was told in reference to five hundred families who were born in hell (niraya) as a result of following Devadatta. J.iv.158‑66.