Is a trick a sin? When reading I Samuel 21:1-9, can we say that David lied to Ahimelech or tricked him? In many cases in the book of First Samuel David used a trick to get himself out of trouble.
"David said to Ahimelech the priest, "The king has commissioned me with a matter and has said to me, 'Let no one know anything about the matter on which I am sending you and with which I have commissioned you; and I have directed the young men to a certain place'" (I Samuel 21:2).
David's statement to Ahimelech was an outright lie. It demonstrates that like everyone of us, David was a flawed man. His intention was to do righteousness, but under pressure he sometimes gave into sin. David later wrote: "My soul melts from heaviness; strengthen me according to Your word. Remove from me the way of lying, and grant me Your law graciously" (Psalms 119:28-29). David acknowledges that he had a problem with lying, a problem he was determined to overcome.
In this particular case, David's fear didn't allow him to trust in God's protection as he was fleeing for his life. Perhaps he thought lying was excusable since he was saving the lives of his men and himself, but the result of his lies led to the death of many. "Then the king said to Doeg, "You turn around and attack the priests." And Doeg the Edomite turned around and attacked the priests, and he killed that day eighty-five men who wore the linen ephod. And he struck Nob the city of the priests with the edge of the sword, both men and women, children and infants; also oxen, donkeys, and sheep he struck with the edge of the sword" (I Samuel 22:18-19). David came to realize that he was responsible for this destruction. "Then David said to Abiathar, "I knew on that day, when Doeg the Edomite was there, that he would surely tell Saul. I have brought about the death of every person in your father's household"" (I Samuel 22:22). What a burden to carry!