The saying of the Exalted: "And thus We have made you a median nation," meaning: just; that is, the nation of Muhammad, "that you may be witnesses over the people" on the Day of Resurrection, that the messengers have conveyed to their people on behalf of their Lord, "and the Messenger may be a witness over you," that he has conveyed the message of his Lord to his nation. This is the interpretation of Qatada.
Muhammad said: Some of them recited:
(They are median, the people are pleased with their judgment … when one of the great calamities of the nights descends)
Meaning: 'Median' as in just and chosen.
The saying of the Exalted: "And We did not make the qiblah which you were upon"—meaning: Bayt al-Maqdis—"except that We might make evident"—meaning: the knowledge of one's actions—"who would follow the Messenger from those who would turn back on their heels. And indeed, it was difficult except for those whom Allah has guided," meaning: the changing of the qiblah. Qatada said: "The qiblah was a trial and a purification. The Messenger of Allah (peace and blessings of Allah be upon him) prayed toward Bayt al-Maqdis during the period of his stay in Mecca, and the Ansar prayed toward Bayt al-Maqdis for two years before the arrival of the Prophet (upon him peace) to Medina. The Prophet (peace and blessings of Allah be upon him) prayed toward Bayt al-Maqdis for sixteen months after his arrival in Medina, then Allah (may He be glorified and exalted) directed him after that toward the Kaaba. So, some said: 'What has turned them away from their qiblah which they were upon?' For a man indeed yearned for his birthplace."
The saying of the Exalted: "And never would Allah have caused your faith to be wasted," meaning: your prayer toward Bayt al-Maqdis. Qatada said: When the qiblah was changed, a people said: "What about our deeds which we were..."
قَوْله تَعَالَى: ﴿وَكَذَلِكَ جَعَلْنَاكُمْ أُمَّةً وسطا﴾ أَي: عدلا؛ يَعْنِي: أمة مُحَمَّد ﴿لِتَكُونُوا شُهَدَاء على النَّاس﴾ يَوْم الْقِيَامَة بِأَن الرُّسُل قد بلغت قَومهَا عَنْ رَبهَا ﴿وَيَكُونَ الرَّسُول عَلَيْكُم شَهِيدا﴾ أَنَّهُ قد بلغ رِسَالَة ربه إِلَى أمته؛ وَهَذَا تَفْسِير قَتَادَة.
قَالَ مُحَمَّد: وَأنْشد بَعضهم:
(هُم وسط يرضى الْأَنَام بحكمهم … إِذا نزلت إِحْدَى اللَّيَالِي بمعظم)
يَعْنِي: بوسط: عدلا خيارا.
قَوْله تَعَالَى: ﴿وَمَا جَعَلْنَا الْقِبْلَةَ الَّتِي كُنْتَ عَلَيْهَا﴾ يَعْنِي: بَيت الْمُقَدّس ﴿وَإِلَّا لنعلم﴾ يَعْنِي: علم الفعال ﴿مَنْ يَتَّبِعُ الرَّسُولَ مِمَّنْ يَنْقَلِبُ عَلَى عَقِبَيْهِ وَإِنْ كَانَتْ لَكَبِيرَةً إِلا عَلَى الَّذين هدى الله﴾ يَعْنِي: صرف الْقبْلَة، قَالَ قَتَادَة: ((كَانَت الْقبْلَة فِيهَا بلَاء وتمحيص، صلى رَسُول اللَّهِ ﷺ مُدَّة أقامته بِمَكَّة إِلَى بَيت الْمُقَدّس، وصلت الْأَنْصَار نَحْو بَيت الْمُقَدّس حَوْلَيْنِ قبل قدوم النَّبِي عليه السلام إِلَى الْمَدِينَة، وَصلى النَّبي ﷺ بعد قدومه الْمَدِينَة نَحْو بَيت الْمُقَدّس سِتَّة عشر شهرا، ثمَّ وَجهه اللَّهُ ﷿ بَعْدَ ذَلِكَ إِلَى الْكَعْبَة؛ فَقَالَ قَائِلُونَ: ﴿مَا وَلَّاهُمْ عَنْ قِبْلَتِهِمُ الَّتِي كَانُوا عَلَيْهَا﴾ لَقَد اشتاق الرجل إِلَى مولده)).
قَوْله تَعَالَى: ﴿وَمَا كَانَ اللَّهُ لِيُضيع إيمَانكُمْ﴾ يَعْنِي: صَلَاتكُمْ إِلَى بَيت الْمُقَدّس، قَالَ قَتَادَة: لما صرفت الْقبْلَة قَالَ قوم: كَيفَ بأعمالنا الَّتي كُنَّا