God saw that the earth had become corrupt and filled with violence. He decided to destroy all flesh and flood the earth, but instructed Noah to build an ark to save his family and two of every kind of animal. Noah obeyed God and took his family and the animals onto the ark, where they stayed as God sent the floodwaters to destroy the earth. After the waters receded, God established a covenant with Noah and all flesh that he would never again destroy the earth with a flood.