Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:10:2

Have the people been amazed that We revealed ˹revelation˺ to a man from among them, ˹saying˺, "Warn mankind and give good tidings to those who believe that they will have a ˹firm˺ precedence of honor with their Lord"? ˹But˺ the disbelievers say, "Indeed, this is an obvious magician."  

Is it for the people, the people of Mecca (this interrogative is meant as a disavowal; the preposition ˹li-, ‘for’˺ and its dependent genitive noun ˹al-nās, ‘the people’˺ constitute a circumstantial qualifier of His saying): a wonder (‘ajaban: read in the accusative as a predicate of kāna; or if read in the nominative ˹‘ajabun˺ as its subject: its predicate, which is also its subject if read according to the former ˹accusative˺ reading, is ˹the following, an awhaynā˺) that We have inspired a man from among them, Muhammad (s), ˹saying˺ (an, ‘that’, is explicative): ‘Warn, threaten, the people, the disbelievers, with chastisement, and give good tidings to those who believe that they have a prior, a preceding, ˹promise of˺ truth with their Lord’?, that is a ˹preceding˺ fair reward, in return for the deeds they have sent forward. The disbelievers say, ‘Truly this, Qur’ān that comprises all of that ˹mentioned˺, is manifest sorcery’: a variant reading ˹for la-sihrun˺ has lasāhirun, ‘a sorcerer’, where it is the Prophet (s) to whom they are referring ˹as being ‘a manifest sorcerer’˺.
القرآن:١٠:٢

أَكَانَ لِلنَّاسِ عَجَبًا أَنْ أَوْحَيْنَا إِلَىٰ رَجُلٍ مِنْهُمْ أَنْ أَنْذِرِ النَّاسَ وَبَشِّرِ الَّذِينَ آمَنُوا أَنَّ لَهُمْ قَدَمَ صِدْقٍ عِنْدَ رَبِّهِمْ ۗ قَالَ الْكَافِرُونَ إِنَّ هَٰذَا لَسَاحِرٌ مُبِينٌ  

{أكان للناس} أي أهل مكة، استفهام إنكار والجار والمجرور حال من قوله {عَجبا} بالنصب خبر كان، وبالرفع اسمها والخبر وهو اسمها على الأولى {أن أوحينا} أي إيحاؤنا {إلى رجل منهم} محمد {أن} مفسرة {أنذر} خوِّف {الناس} الكافرين بالعذاب {وبشر الذين آمنوا أن} أي بأن {لهم قدم} سلف {صدق عند ربهم} أي أجرا حسناً بما قدموه من الأعمال {قال الكافرون إن هذا} القرآن المشتمل على ذلك {لَسِحْرٌ مبين} بيِّن، وفي قراءة لَساحرٌ، والمشار إليه النبي.