In the ninth plague, God commanded Moses to stretch his hands up to the sky, to bring darkness upon Egypt. This darkness was so heavy that an Egyptian could physically feel it. It lasted for three days, during which time there was light in the homes of the Israelites. Pharaoh then called to Moses and offered to let all the Israelites leave, if only the darkness would be removed from his land. However, he required that their sheep and cattle stay. Moses refused, and went on to say that before long, Pharaoh himself would offer to provide animals for sacrifice. Pharaoh, outraged, then threatened to execute Moses if he should again appear before Pharaoh. Moses replied that he would indeed not visit the Pharaoh again.
This plague was an attack aimed directly at Pharaoh's deity Ra, the Egyptian sun god. By introducing the plague of darkness, Moses attempted to prove whose god was more powerful.