In the beginning, there was only the sky above, water and marshland below.
The chief god Olorun ruled the sky, and the goddess Olokun ruled what was below.
Obatala, another god, reflected upon this situation, then went to Olorun for permission to create dry land for all kinds of living creatures to inhabit.
He was given permission, so he sought advice from Orunmila, oldest son of Olorun and the god of prophecy.
He was told he would need a gold chain long enough to reach below, a snail's shell filled with sand, a white hen, a black cat, and a palm nut, all of which he was to carry in a bag.
All the gods contributed what gold they had, and Orunmila supplied the articles for the bag.
When all was ready, Obatala hung the chain from a corner of the sky, placed the bag over his shoulder, and started the downward climb. When he reached the end of the chain he saw he still had some distance to go.
From above, he heard Orunmila instruct him to pour the sand from the snail's shell, and also immediately release the white hen.
He did as he was told, whereupon the hen landing on the sand began scratching and scattering it about.
Wherever the sand landed it formed dry land, the bigger piles becoming hills and the smaller piles valleys. Obatala jumped to a hill and named the place Ife.
The dry land now extended as far as he could see.
He dug a hole, planted the palm nut, and saw it grow to maturity in a flash. The mature palm tree dropped more palm nuts on the ground, each of which grew immediately to maturity and repeated the process. Obatala settled down with the cat for company.
Many months passed, and he grew bored with his routine.
He decided to create beings like himself to keep him company.
He dug into the sand and soon found clay with which to mould figures like himself and started on his task, but he soon grew tired and decided to take a break.
He made wine from a nearby palm tree, and drank bowl after bowl. Not realizing he was drunk, Obatala returned to his task of fashioning the new beings; because of his condition he fashioned many imperfect figures.
Without realizing this, he called out to Olorun to breathe life into his creatures.
The next day he realized what he had done, and swore never to drink again, and to take care of those who were deformed, thus becoming Protector of the Deformed.
The new people built huts as Obatala had done, and soon Ife prospered and became a city.
All the other gods were happy with what Obatala had done, and visited the land often, except for Olokun, the ruler of all below the sky.
She had not been consulted by Obatala, and grew angry that he had usurped so much of her kingdom.
When Obatala returned to his home in the sky for a visit, Olokun summoned the great waves of her vast oceans and sent them surging across the land.
Wave after wave she unleashed, until much of the land was underwater and many of the people were drowned.
Those that had fled to the highest land beseeched the god Eshu who had been visiting, to return to the sky and report what was happening to them.
Eshu demanded sacrifice be made to Obatala and himself before he would deliver the message.
The people sacrificed some goats, and Eshu returned to the sky.
When Orunmila heard the news he climbed down the golden chain to the earth, and cast many spells which caused the flood waters to retreat and the dry African land reappear.
So ended the great flood.