Muhammad preached to the people to trust in Allah. His whole life was a sublime example of the precept. In the loneliness of Makkah, in the midst of persecution and danger, in adversity and tribulations, and in the thick of enemies in the battles of Uhud and Hunayn, complete faith and trust in Allah appears as the dominant feature in his life. However great the danger that confronted him, he never lost hope and never allowed himself to be unduly agitated. Abu Taalib knew the feelings of the Quraysh when the Prophet started his mission. He also knew the lengths to which the Quraysh could go, and requested the Prophet to abandon his mission, but the latter calmly replied: "Dear uncle, do not go by my loneliness. Truth will not go unsupported for long. The whole of Arabia and beyond will one day espouse its cause." [Ibn Hishaam]
When the attitude of the Quraysh became more threatening, Abu Taalib again begged his nephew to renounce his mission but the Prophet's reply was: "O my uncle, if they placed the sun in my right hand and the moon in my left, to force me to renounce my work, verily I would not desist thereform until Allah made manifest His cause, or I perished in the attempt." (Ibid)
To another well-wisher, he said: "Allah will not leave me forlorn."
A dejected and oppressed companion was comforted with the words:
"By Allah, the day is near when this faith will reach its pinnacle and none will have to fear anyone except Allah." [Al-Bukhari]
It was the same trust in Allah which emboldened the prophet to say his prayers openly in the Haram (sacred Mosque of Makkah) in the teeth of opposition. The Quraysh were once collected there and were conspiring to put an end to his life when he next entered the Haram. His young daughter Faatimah, may Allah be pleased with her, who happened to overhear their talk rushed weeping to her father and told him of the designs of the Quraysh. He consoled her, did his ablutions and went to the Ka'bah to say prayers. There was only consternation among the Quraysh when they saw him [Ahmad].
Then leaving his house for Madeenah he asked Ali, may Allah be pleased with him, to sleep on his bed and told him: "Do not worry, no one will be able to do you any harm" [At-Tabari, Ibn Hishaam]
Even though the enemies had surrounded the house, he left the house reciting the Quranic verse (which means): {We have set a barricade before them and a barricade behind them and (thus) have covered them so that they see not} [Quran, 36: 9]
Abu Bakr, may Allah be pleased with him, was frightened when pursuers came close to the cavern in which he and Prophet Muhammad hiding during their flight, but the Prophet heartened him: "Grieve not. Allah is with us."
A guard was kept at the Prophet's house in Madeenah because of the danger that surrounded him but he had it withdrawn when the Quranic verse was revealed (which means): {Allah will protect you from the people}. [Quran, 5: 67]
A man was caught waiting in ambush to assault the Prophet but he was directed to be released with the words: "Even if this man wanted to kill me, he could not." [Ahmad]
A Jewish woman from Khaybar had put poison in the Prophet's food. He spat it out after taking a morsel but a companion who had his fill died the next day. The Jewess was brought before the prophet who questioned her: "Why did you do this?" "To kill you," was her defiant reply. She was told, "Allah would not have allowed you to do it." [Muslim]
In the battle of Uhud when the rear guard action of the Makkan army had disorganized the Muslim army and had turned the tables, the Prophet stood as firm as a rock even though he had suffered personal injuries. When Abu Sufiyaan taunted the Muslims and shouted "Victory to Hubal!" (Hubal was one of their idols), the Prophet asked Umar, may Allah be pleased with him, to shout back: "Allah is our protector and friend. You have no protector and friend. Allah is Great, Magnificent." [Ibn Hishaam]
Again in the battle of Hunayn, when the unexpected assault of the army had swept the Muslim force off its feet and a defeat seemed imminent, the Prophet did not yield ground. With trust in Allah he showed such courage that the Muslim army rallied behind him to win a signal victory.