your justice and uprightness.
The command given to face Al Aqsa Mosque in Salah was a test to distinct those who obey Allah from those who disobey Him. Particularly, the Arabs were clinging to the House, and turning from that direction was difficult for them. Therefore, Allah wanted to direct the hearts of those who submitted to Him to absolute obedience and to purify them from the remaining traditions of the Jahiliyyah [Pre-Islamic Period], no matter how their significance may be. That is in order for this rearing to be effective in their souls and for them to be trained on obedience and compliance. Though this matter was hard on their souls, it was easy for their believing and guided hearts which have believed in the truthfulness of the message of Muhammad [peace be upon him], to believe that the revelation that he was sent with is the truth with no doubt. They have known that Allah does what He wills and commands in His Kingdom as He wills. So, a Muslim has to obey and comply.
Allah would never waste your previous Salah offered towards Jerusalem i.e. their reward with Allah will not be wasted because He is full of kindness, the Most Merciful with His Servants. He guides them to pure blessings with His Grace and Mercy.
﴿قَدْ نَرَى تَقَلُّبَ وَجْهِكَ فِي السَّمَاء فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَاهَا فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا وُجُوِهَكُمْ شَطْرَهُ وَإِنَّ الَّذِينَ أُوْتُوا الْكِتَابَ لَيَعْلَمُونَ أَنَّهُ الْحَقُّ مِن رَّبِّهِمْ وَمَا اللّهُ بِغَافِلٍ عَمَّا يَعْمَلُونَ﴾ [البقرة: 144]
144 - The Messenger of Allah [peace be upon him] loved to be directed towards the Ka`bah, as was reported in Sahih Al Bukhari. So, his Lord told him that his request shall be responded. He will direct you back towards the direction of the Qiblah that you yearn and love. Thus, He turned your direction in Salah towards Al Masjid Al Haram [the Sacred Masjid]. O Muslims, wherever you are you should turn your faces towards the direction of the Qiblah until Allah inherits the earth and all that on it.
Verily, the Jews and the Christians know that your turning towards the House is the truth because it is written in their Scriptures about the description of Prophet Muhammad [peace be upon him] and his nation. They know that the Ka`bah is the first place on earth where Allah has been worshipped. It is the House that Prophet Abraham [peace be upon him] built and laid its foundations. The Jews and the Christians are not convinced with the proofs and they conceal the knowledge that was written in their Scriptures. Certainly, Allah is not heedless about what they do and shall punish them in the world and in the Hereafter for that. He is also not heedless of the reward of the believers either.
﴿وَلَئِنْ أَتَيْتَ الَّذِينَ أُوْتُوا الْكِتَابَ بِكُلِّ آيَةٍ مَّا تَبِعُوا قِبْلَتَكَ وَمَا أَنتَ بِتَابِعٍ قِبْلَتَهُمْ وَمَا بَعْضُهُم بِتَابِعٍ قِبْلَةَ بَعْضٍ وَلَئِنِ اتَّبَعْتَ أَهْوَاءهُم مِّن بَعْدِ مَا جَاءكَ مِنَ الْعِلْمِ إِنَّكَ إِذَاً لَّمِنَ الظَّالِمِينَ﴾ [البقرة: 145]
145– And even if you were to bring to the Jews and the Christians one proof after another on the authenticity of what you brought to them and even if Allah were to support you with miracles in this regard, they would not abandon their whims. Moreover, they would not direct their faces to the Qiblah [the direction of Salah] that was ordained for you by your Lord. On the other hand, you neither will follow their Qiblah nor follow their whims because you follow the ordinances of Allah and