Imam Ja‘far as-Sadiq the Pharaoh built seven cities and seven forts and was besieged inside them in fear of Musa. From one fort to another fort, there were forests with wild beasts. If anybody entered without his permission, the wild beasts attacked and killed him. Allah sent Musa with special authority towards it. When he reached to the first gate, he cast his stick and the gate opened. Musa entered. When the wild beasts saw him they all ran away. In this way when he reached every gate, it opened and all wild beasts disappeared from there. At last Prophet came to the last gate, he sat there. He was dressed up in clothes woven of hair, and held a staff. A servant of the Pharaoh came out. Musa asked him to get permission from him, to meet the Pharaoh. He didn’t take notice. Prophet asked him again. He said, “Allah has bestowed you with special authority (Prophethood) and why not any other person?”
Musa was very angry and cast his staff so all the gates between him and the Pharaoh opened. The Pharaoh saw him and called him in. Musa came and sat with a group of scholar and learned people. The Pharaoh was sitting on a throne, 80 feet high. Musa said, “I have come from the Wonderful Originator of the heavens and the earth and I am a Prophet.” The Pharaoh said, “If you are truthful, show us your miracle.” Musa cast his staff which had two branches. It became a large serpent and opened its mouth and raised one part of a palace up and remaining part below him. The Pharaoh noticed the flame of fire coming out from his stomach. Another head faced him. Due to fear the Pharaoh urinated in his clothes. He cried loudly and said, “O Musa stop it.” Seeing this the other people ran away. Musa picked up his staff. The Pharaoh came to senses and thought of pledging allegiance to him but his vizier, Haman said, “O my Lord! (the Pharaoh). People worship you as a God and you want to be obedient of an ordinary person?” His ministers gathered and said that Musa was a magician. They decided on a particular day to challenge him. The Pharaoh invited all the famous magicians to his court to challenge Musa. The magicians threw their ropes and staffs in front of him by their magic, Musa also cast his staff towards them, it became a giant serpent and swallowed their magical ropes and staffs. They were in all seventy-two magicians. They all bowed down and made obeisance and said, “He is not a magician. His staff is miraculous.”