Joshua 2, Psalm 123-125, Isaiah 62, Matthew 10

Joshua 2:3-6
There are many intriguing people in the Bible.  Rahab is a must on that list.  If I were a historical fiction writer, her life story would make a great novel.  Using sanctified imagination, my story line would be the prostitute who married a spy and became the great-grandmother of Israel's greatest king, David.
Rahab is mentioned three times in the NT.  In Matthew 1:5, she is included in the lineage of Jesus.  The "hall of faith," Hebrews 11 includes her, "By faith Rahab the prostitute did not perish with those who were disobedient, because she had given a friendly welcome to the spies."   James 2:25 says, "And in the same way was not also Rahab the prostitute justified by works when she received the messengers and sent them out by another way?" 
But inevitably when I think of Rahab, I remember the lie she told to protect the spies.  Since lying is a sin (Exodus 20:16), how is Rahab's sin justified?  Not only is Rahab's lie not condemned, but she is also obviously a very blessed woman.  When I find a situation in the Bible not easily understood, I try to find similar circumstances to help me apply that Scripture in my life. 
In Exodus 1, when Pharaoh commanded the midwives to kill the Hebrew baby boys, they lied about why they didn't obey his orders.  Exodus 1:20-21 says, "So God dealt well with the midwives...and because the midwives feared God, he gave them families."  In both these circumstances, Rahab and the midwives, a conflict between speaking truthfully and protecting life arises.  
I notice another similarity between Rahab and the midwives in Exodus 1. There we are told the midwives feared God.  In Joshua 2:9-11, Rahab says "I know that the LORD has given you the land...the LORD dried up the waters of the Red Sea...The LORD your God, he is God in the heavens above and on the earth beneath."  Just like the midwives, Rahab had a proper fear of the LORD God.  Since faith is a gift from God and Rahab is listed as one of the faithful in Hebrews 11, God gave her the faith to trust Him in protecting the lives of His spies. 
Two things strike me as I think through the implications of applying these passages to my life.  First, these are obviously extreme situations; both are a matter of life and death.  Second, when I lie is it about protecting my image or about the life of someone else? 
I know God is the "God of truth" (Isaiah 65:16); Jesus is the way, the truth and the life (John 14:6); and the Holy Spirit is "the Spirit of truth" (John 16:13).  Conversely, in John 8:44, Jesus, speaking of the devil, says "There is no truth in him.  When he lies, he speaks out of his own character, for he is a liar and the father of lies."
So is lying okay for believers?  Rarely, it seems, and only in extreme situations in which the life of another is at stake.  Rahab's great-grandson, David, said it this way in Psalm 51:6, "You desire honesty from the womb." (NLT)

O Lord God the Almighty!  Just and true are your ways, O King of the nations!  Father, Your Word is truth.   May my words also be truthful.  Holy Spirit, convict me of lying to put myself in the best possible light.  Please, if You ever lead me into a situation like Rahab's, give me the proper words.