Sayyiduna Awf bin Malik (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) judged between two men. The one against whom the judgment was given said: "Allah is sufficient for me, and He is the best Disposer of affairs." The Prophet (peace and blessings be upon him) said: "Allah blames for helplessness, but you should adopt prudence; then when a matter overwhelms you, say: 'Hasbiyallahu wa ni'mal-wakil' (Allah is sufficient for me, and He is the best Disposer of affairs)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20725