In the Book of Exodus, God sends a series of plagues upon Egypt and the Pharaoh, in order to get him to release the Israelites from slavery. Yet before God does this, he makes this declaration, in Exodus 4:21:
This would seem to defeat the purpose, and be manifestly unfair. However, the NIV Study Bible notes:
A keyword search of Biblegateway will confirm that this is indeed the case (though in some places it is not made clear who is responsible for the "hardening"). This seems to lessen the problem, since it suggests the Pharaoh had a lot of chances. Only after he had consistently failed to do the right thing does God stop giving him the choice.
This is not entirely satisfactory though. Throughout the story, there are dark hints that the whole affair is for the purpose of demonstrating God's power. For example, this is Exodus 10:1-2:
Deliberately making things worse for the ordinary Egyptians seems indefensible. Of course, a lot of believing Christians think that God is fully entitled to do nasty things to people. This is not a view I share, since it makes a mockery of God's supposed goodness, but it would remove the difficulty.
Updated: 2009-03-06