(Romans 9:17-18) - "For the Scripture says to Pharaoh, "For this very purpose I raised you up, to demonstrate My power in you, and that My name might be proclaimed throughout the whole earth." 18So then He has mercy on whom He desires, and He hardens whom He desires."
Romans 9:9-23 is some of the most controversial scripture in the Bible. When reading through it, one quickly finds the sovereignty of God in distinction to the free will of man. What is going on?
Basically, God has the right to do with His creation as He wills. We see from the Word that God is in control, "For truly in this city there were gathered together against Thy holy servant Jesus, whom Thou didst anoint, both Herod and Pontius Pilate, along with the Gentiles and the peoples of Israel, 28 to do whatever Thy hand and Thy purpose predestined to occur," (Acts 4:27-28). In other words, God is in control. God can also move peoples' hearts (Prov. 21:1) and directs history to where He wants it to go.
God raised up Pharaoh for a purpose: to demonstrate His power. How was this done? It was done by working miracles through Moses and delivering the Israelites. Does God have the right and ability to harden whom He desires in the process of accomplish His will? Absolutely for that is what it says in 9:18. Does this make God wrong in anyway? Not at all. God can do no wrong. Pharaoh was a sinner who deserved the righteous judgment of God. Some say that God simply strengthened Pharaoh's heart towards its natural tendency. Others maintain that God actively hardened his the heart. Whichever the case, Pharaoh rejected the true and living God and God used him for His own purpose.