The code of Divine Laws according to which humans become the rightful inheritors of this earth, was given to humankind through the Prophet (PBUH). He (PBUH) proclaimed to all nations that their correct and complete development can only be achieved through obeying these Divine Laws. The nation that rejects these Laws will be deprived of Divine blessings (9:61).
The Prophet (PBUH) thus became a source of real blessings for all humanity.
وَمَا أَرْسَلْنَاكَ إِلَّا رَحْمَةً لِّلْعَالَمِينَ
(21:107) – And [thus, O Prophet,] We have sent thee as [an evidence of Our] grace towards all the worlds. [Asad]
The Prophet (PBUH) was sent to all the worlds with proof and evidence in support of the truth of Allah’s message and was told to present it in a beautiful and endearing way:
ادْعُ إِلَىٰ سَبِيلِ رَبِّكَ بِالْحِكْمَةِ وَالْمَوْعِظَةِ الْحَسَنَةِ ۖ وَجَادِلْهُم بِالَّتِي هِيَ أَحْسَنُ ۚ إِنَّ رَبَّكَ هُوَ أَعْلَمُ بِمَن ضَلَّ عَن سَبِيلِهِ ۖ وَهُوَ أَعْلَمُ بِالْمُهْتَدِينَ
(16:125) – Invite (all) to the Way of thy Lord with wisdom and beautiful preaching; and argue with them in ways that are best and most gracious: for thy Lord knoweth best, who have strayed from His Path, and who receive guidance. [Yusuf Ali]
O Messenger! Do not entangle yourself with them. You continue your program of inviting people to the way of Allah with wisdom and kindly exhortation and discuss matters with them in the best possible manner. Allah knows best who is following the right path and who has gone astray.
And the Prophet (PBUH) spoke with them about themselves in such an attractive way that the message entered straight into their heart.
أُولَٰئِكَ الَّذِينَ يَعْلَمُ اللَّهُ مَا فِي قُلُوبِهِمْ فَأَعْرِضْ عَنْهُمْ وَعِظْهُمْ وَقُل لَّهُمْ فِي أَنفُسِهِمْ قَوْلًا بَلِيغًا
(4:63) – Those men,-Allah knows what is in their hearts; so keep clear of them, but admonish them, and speak to them a word to reach their very souls. [Yusuf Ali]
This will help those – who still have in their hearts even a small desire to accept the truth – to avoid falling into hell, the pit of destruction:
وَذَكِّرْ بِهِ أَن تُبْسَلَ نَفْسٌ بِمَا كَسَبَتْ
(6:70) – But remind (them) with it (the Quran) lest a person be given up to destruction for that which he has earned. [Hilali & Khan]
Leave them alone but continue to convey to them the teachings of the Quran so that none is destroyed through not receiving Allah’s guidance.
As for others who are utterly arrogant and argumentative and in total denial of this message, there is no hope for them because their hearts are dead:
إِنَّكَ لَا تُسْمِعُ الْمَوْتَىٰ وَلَا تُسْمِعُ الصُّمَّ الدُّعَاءَ إِذَا وَلَّوْا مُدْبِرِينَ ; وَمَا أَنتَ بِهَادِي الْعُمْيِ عَن ضَلَالَتِهِمْ ۖ إِن تُسْمِعُ إِلَّا مَن يُؤْمِنُ بِآيَاتِنَا فَهُم مُّسْلِمُونَ
(27:80-81) – Verily, you cannot make the dead to hear (i.e. benefit them and similarly the disbelievers), nor can you make the deaf to hear the call, when they flee, turning their backs. Nor can you lead the blind out of their error, you can only make to hear those who believe in Our Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.), and who have submitted (themselves to Allah in Islam as Muslims). [Hilali & Khan]
The only people who will be attracted to the divine message are those who are willing to listen and are prepared to ponder over what is being said to them; and thus believe in the truthfulness of Allah’s Laws and thereafter submit before them wholeheartedly.
And, O Prophet (PBUH), do not get disheartened because they do not listen to you although what you say is based on truth, knowledge and wisdom. Only those who use their minds with rationale and reason can ponder on this. How can anyone who is drenched in his emotions and devoid of his faculty of thinking, do so? Therefore, do not be disheartened that they do not listen to you:
لِّيُنذِرَ مَن كَانَ حَيًّا وَيَحِقَّ الْقَوْلُ عَلَى الْكَافِرِينَ
(36:70) – That he or it (Muhammad SAW or the Quran) may give warning to him who is living (a healthy minded the believer), and that Word (charge) may be justified against the disbelievers (dead, as they reject the warnings). [Hilai & Khan]
The Quran says:
وَّمَا هُوَ بِقَوْلِ شَاعِرٍ ۭ قَلِيْلًا مَّا تُؤْمِنُوْنَ
(69:41) – It is not the word of a poet, little is that you believe! [Hilai & Khan]
The Prophet (PBUH) conveyed Allah’s commands to the people. These were not the sayings of a poet or a soothsayer's guesswork. There are however, very few who use their intellect and logic to ponder deeply on Allah’s commands; and believe in the truthfulness of these commands and adopt them as a Divine Code.
In fact, warning those who are traveling on the wrong path in their journey of life, that they are headed for destruction, is also a form of glad tiding. Warning people to take appropriate shelter because a severe tornado is approaching is actually good news for them for their own safety and wellbeing. Ignoring this warning is actually inviting death and destruction. This is the purpose of the warning by the Quran:
قَيِّمًا لِّيُنذِرَ بَأْسًا شَدِيدًا مِّن لَّدُنْهُ وَيُبَشِّرَ الْمُؤْمِنِينَ الَّذِينَ يَعْمَلُونَ الصَّالِحَاتِ أَنَّ لَهُمْ أَجْرًا حَسَنًا ; مَّاكِثِينَ فِيهِ أَبَدًا
(18:2-3) – (He has made it) Straight to give warning (to the disbelievers) of a severe punishment from Him, and to give glad tidings to the believers (in the Oneness of Allah Islamic Monotheism), who work righteous deeds, that they shall have a fair reward (i.e. Paradise). They shall abide therein forever. [Hilali & Khan]
It gives warning of a grievous chastisement to the non-believers and announces to the believers – who do right things, glad tidings – that blessings from Allah await them; a home wherein they shall abide beyond the count of time.
And: وَكَذَٰلِكَ أَوْحَيْنَا إِلَيْكَ قُرْآنًا عَرَبِيًّا لِّتُنذِرَ أُمَّ الْقُرَىٰ وَمَنْ حَوْلَهَا وَتُنذِرَ يَوْمَ الْجَمْعِ لَا رَيْبَ فِيهِ ۚ فَرِيقٌ فِي الْجَنَّةِ وَفَرِيقٌ فِي السَّعِيرِ
(42:7) – Thus have We sent by inspiration to thee an Arabic Qur'an: that thou mayest warn the Mother of Cities and all around her,- and warn (them) of the Day of Assembly, of which there is no doubt: (when) some will be in the Garden, and some in the Blazing Fire. [Yusuf Ali]
The clear and explicit Code of Laws were revealed to the Prophet (PBUH) to caution people living in and around Makkah about the destructive results of their erroneous way of life. Then, he warned them that, if they do not abandon this way of life then for the final decision on this tussle, all groups will be gathered together on an open field. One group will enter heavenly society (as victors) while the others will fall in the ditch of Hell (as losers). The Prophet (PBUH) told them that this is undoubtedly bound to happen.
The messenger himself has been called a warner:
يَا أَيُّهَا النَّبِيُّ إِنَّا أَرْسَلْنَاكَ شَاهِدًا وَمُبَشِّرًا وَنَذِيرًا
(33:45) – O Prophet! Truly We have sent thee as a Witness, a Bearer of Glad Tidings, and Warner. [Yusuf Ali]
The Prophet (PBUH) was sent to establish a Divine System which will also supervise the performance of all nations (2:43). He (PBUH) was the bearer of glad tidings to the people who will follow this System; and warned them about the destructive results of disobeying it (33:45, 28:46, 38:65, 46:9, 48:8, 51:51, and 53:56).
As mentioned, the other facet of the warning is glad tiding. But when someone is told that his wrong path of life will lead to destruction and hell – then this is the negative aspect of the warning. Its positive aspect is that the correct path will lead him to success and to heavenly life. This is the glad tiding for the righteous deed. So, warning and glad tiding are, in fact, two lines of the same couplet, two branches of the same root, two sides of the same coin:
وَمِن قَبْلِهِ كِتَابُ مُوسَىٰ إِمَامًا وَرَحْمَةً ۚ وَهَـٰذَا كِتَابٌ مُّصَدِّقٌ لِّسَانًا عَرَبِيًّا لِّيُنذِرَ الَّذِينَ ظَلَمُوا وَبُشْرَىٰ لِلْمُحْسِنِينَ
(46:12) – And before this, was the Book of Moses as a guide and a mercy: And this Book confirms (it) in the Arabic tongue; to admonish the unjust, and as Glad Tidings to those who do right. [Yusuf Ali]
The book revealed earlier to Moses (PBUH) was a code of correct guidance and a source of nourishment for human beings. However, it did not stay in its original form. Now this Book, the Quran, has been sent to practically prove the claims mentioned in that earlier book. This Book (the Quran) has been revealed in an explicit clear language (Arabic), so that the Prophet (PBUH) can warn those who have left the right course and have adopted aggressive and unjust ways. Also he (PBUH) can give glad tidings to those who lead balanced and righteous lives.
Therefore, Prophet Muhammad (PBUH) was both a warner and a source of glad tidings to all humankind:
إِنَّا أَرْسَلْنَاكَ بِالْحَقِّ بَشِيرًا وَنَذِيرًا ۖ وَلَا تُسْأَلُ عَنْ أَصْحَابِ الْجَحِيمِ
(2:119) – Verily We have sent thee in truth as a bearer of glad tidings and a warner: But of thee no question shall be asked of the Companions of the Blazing Fire. [Yusuf Ali]
It is in accordance with the Divine Plan that the Prophet (PBUH) was sent to give glad tidings to those who will live in accordance with Allah’s Revelation; and a warning to those who will do the opposite. If the latter do not pay heed to the warning, then they would be destroyed and become companions of hell – and the Prophet (PBUH) will not be held responsible for their agonizing end.