When God sends Moses to Egypt to free the Israelites, He tells him he will harden Pharoah's heart so he refuses in spite of all the miracles performed by Moses to prove he was sent by God. There are theories about this which exonerate God of wrongdoing, but if we apply Occam's Razor it seems pretty clear that God can be culpable for men's actions. It's not always a case of turning away from God. Sometimes, as in the Pharoah's case, God turns you away from him. The question is, will he send you to hell afterwards?
I watched the Prince of Egypt last night and the way the writers portrayed it was that Ramses's father called him weak and his mindset was solidified while he was in his youth to not make changes to the kingdom which would be construed as an act of weakness.
When Moses requested for his people to be let go, Ramses scoffed and the magicians were enabled to conjure apparent miracles to make the Pharaoh feel invincible over the God of Israel. God allowed these magicians or occult workers to have their mystical works produce a very powerful sway on Pharaoh's perception of the situation. God let the acts of magic happen and this is how He hardened Pharaoh's heart.
If a tree falls in a forest and you hear it, but your eyes are closed, how do you know it's not just fifty porcupines sliding down a hill?
I used to have a big problem with this passage too, it seems so clear cut.
However, I eventually found out that the phrase is essentially idiomatic to the culture of the time. With rulers or leaders, and particularly omnipotent ones like God, they didn't make a linguistic differentiation between causing something to happen and allowing something to happen.
The act of God permitting Pharaoh to harden his own heart would be described as God hardening his heart. Doesn't make a lot of sense to us in modern English, but that's idioms for you.
Time flies like the wind, and fruit flies like a banana.