Narrated Jabir bin `Abdullah: As-Salami: Allah's Apostle used to teach his companions to perform the prayer of Istikhara for each and every matter just as he used to teach them the Suras from the Qur'an He used to say, If anyone of you intends to do some thing, he should offer a two rak`at prayer other than the compulsory prayers, and after finishing it, he should say: O Allah! I consult You, for You have all knowledge, and appeal to You to support me with Your Power and ask for Your Bounty, for You are able to do things while I am not, and You know while I do not; and You are the Knower of the Unseen. O Allah If You know It this matter (name your matter) is good for me both at present and in the future, (or in my religion), in my this life and in the Hereafter, then fulfill it for me and make it easy for me, and then bestow Your Blessings on me in that matter. O Allah! If You know that this matter is not good for me in my religion, in my this life and in my coming Hereafter (or at present or in the future), then divert me from it and choose for me what is good wherever it may be, and make me be pleased with it. (See Hadith No. 391, Vol. 8)