When it is possible to achieve such an aim by lying but not by telling the truth, it is permissible to lie if attaining the goal is permissible, and obligatory to lie if the goal is obligatory… it is religiously precautionary in all cases to employ words that give a misleading impression…
Hadis Sahih Bukhari Volume 5, Book 59, Number 369:
Narrated Jabir bin ‘Abdullah:
Allah’s Apostle said, “Who is willing to kill Ka’b bin Al-Ashraf who has hurt Allah and His Apostle?” Thereupon Muhammad bin Maslama got up saying, “O Allah’s Apostle! Would you like that I kill him?” The Prophet said, “Yes,” Muhammad bin Maslama said, “Then allow me to say a (false) thing (i.e. to deceive Kab). “The Prophet said, “You may say it.” Then Muhammad bin Maslama went to Kab and said, “That man (i.e. Muhammad demands Sadaqa (i.e. Zakat) from us, and he has troubled us, and I have come to borrow something from you.” On that, Kab said, “By Allah, you will get tired of him!” Muhammad bin Maslama said, “Now as we have followed him, we do not want to leave him unless and until we see how his end is going to be. Now we want you to lend us a camel load or two of food.” (Kab said, “Yes, (I will lend you), but you should mortgage something to me.” “We will mortgage our arms to you.” Muhammad bin Maslama and his companion promised Kab that Muhammad would return to him. He came to Kab at night along with Kab’s foster brother, Abu Na’ila. Kab invited them to come into his fort, and then he went down to them. His wife asked him, “Where are you going at this time?” Kab replied, “None but Muhammad bin Maslama and my (foster) brother Abu Na’ila have come.” His wife said, “I hear a voice as if dropping blood is from him, Ka’b said. “They are none but my brother Muhammad bin Maslama and my foster brother Abu Naila. A generous man should respond to a call at night even if invited to be killed.” Muhammad bin Maslama went with two men. So Muhammad bin Maslama went in together with two men, and sail to them, “When Ka’b comes, I will touch his hair and smell it, and when you see that I have got hold of his head, strip him. I will let you smell his head.” Kab bin Al-Ashraf came down to them wrapped in his clothes, and diffusing perfume. Muhammad bin Maslama said. ” have never smelt a better scent than this. Ka’b replied. “I have got the best ‘Arab women who know how to use the high class of perfume.” Muhammad bin Maslama requested Ka’b “Will you allow me to smell your head?” Ka’b said, “Yes.” Muhammad smelt it and made his companions smell it as well. Then he requested Ka’b again, “Will you let me (smell your head)?” Ka’b said, “Yes.” When Muhammad got a strong hold of him, he said (to his companions), “Get at him!” So they killed him and went to the Prophet and informed him. (Abu Rafi) was killed after Ka’b bin Al-Ashraf.”
Reliance of the Traveler (The official sharia manual) (p. 746 – 8.2) – “Speaking is a means to achieve objectives. If a praiseworthy aim is attainable through both telling the truth and lying, it is unlawful to accomplish through lying because there is no need for it. When it is possible to achieve such an aim by lying but not by telling the truth, it is permissible to lie if attaining the goal is permissible, and obligatory to lie if the goal is obligatory… it is religiously precautionary in all cases to employ words that give a misleading impression…