The king of Egypt was getting rather stressed out by the fact that, even though the Israelites were the Egyptians' slaves, they multiplied so much that one day they just might overthrow the Egyptians. The king had a great idea. He spoke with the Hebrew midwives and said, "When you're helping the Hebrew women to give birth, if you see that it's a boy, put it to death." (Exodus 1:16)
The midwives took their orders, but could not bring themselves to carry them out. They knew who was ultimately in charge and it wasn't Pharaoh. When the king found out he was hot. When he questioned the women they said, "These Hebrew women are vigorous; they give birth before we can get to them." (Exodus 1:19)
God has created government for the good of the people (Romans 13:1-5), but that doesn't mean one can act contrary to God's law. We see before us a rare glimpse where God blesses a group of people for lying to the king. God gave approval to their action and stretched out His hand of protection and blessing.