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:2:177

Righteousness is not that you turn your faces toward the east or the west, but ˹true˺ righteousness is ˹in˺ one who believes in Allah, the Last Day, the angels, the Book, and the prophets and gives wealth, in spite of love for it, to relatives, orphans, the needy, the traveler, those who ask ˹for help˺, and for freeing slaves; ˹and who˺ establishes prayer and gives zakah; ˹those who˺ fulfill their promise when they promise; and ˹those who˺ are patient in poverty and hardship and during battle. Those are the ones who have been true, and it is those who are the righteous.  

It is not piety, that you turn your faces, in prayer, to the East and to the West. This was revealed in response to the claim made by the Jews and the Christians to this effect. True piety, that is, the pious person (al-birr, is also read al-barr, in the sense of al-bārr ˹‘the dutiful person’˺) is ˹that of˺ the one who believes in God and the Last Day and the angels and the Book, that is, the scriptures, and the prophets, and who gives of his substance, however, despite ˹it being˺, cherished, by him, to kinsmen and orphans and the needy and the traveller and beggars, and for, the setting free of, slaves, both the captive and the one to be manumitted by contract; and who observes prayer and pays the alms, that are obligatory, and what was ˹given˺ before ˹alms were made obligatory˺, in the way of charity; and those who fulfil their covenant when they have engaged in a covenant, with God or with others, those who endure with fortitude (al-sābirīna is the accusative of laudation) misfortune (al-ba’sā’ is abject poverty), hardship, illness, and peril, at the height of a battle in the way of God; these, described in the way mentioned, are the ones who are truthful, in their faith and in their claims to piety, and these are the ones who are fearful, of God.
القرآن:٢:١٧٧

لَيْسَ الْبِرَّ أَنْ تُوَلُّوا وُجُوهَكُمْ قِبَلَ الْمَشْرِقِ وَالْمَغْرِبِ وَلَٰكِنَّ الْبِرَّ مَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَالْمَلَائِكَةِ وَالْكِتَابِ وَالنَّبِيِّينَ وَآتَى الْمَالَ عَلَىٰ حُبِّهِ ذَوِي الْقُرْبَىٰ وَالْيَتَامَىٰ وَالْمَسَاكِينَ وَابْنَ السَّبِيلِ وَالسَّائِلِينَ وَفِي الرِّقَابِ وَأَقَامَ الصَّلَاةَ وَآتَى الزَّكَاةَ وَالْمُوفُونَ بِعَهْدِهِمْ إِذَا عَاهَدُوا ۖ وَالصَّابِرِينَ فِي الْبَأْسَاءِ وَالضَّرَّاءِ وَحِينَ الْبَأْسِ ۗ أُولَٰئِكَ الَّذِينَ صَدَقُوا ۖ وَأُولَٰئِكَ هُمُ الْمُتَّقُونَ  

{ليس البر أن تولوا وجوهكم} في الصلاة {قبل المشرق والمغرب} نزل ردا على اليهود والنصارى حيث زعموا ذلك {ولكن البرَّ} أي ذا البر وقرئ بفتح الباء أي البار {من آمن بالله واليوم الآخر والملائكة والكتاب} أي الكتب {والنبيين و آتى المال على} مع {حبه} له {ذوي القربى} القرابة {واليتامى والمساكين وابن السبيل} المسافر {والسائلين} الطالبين {وفي} فك {الرقاب} المكاتبين والأسرى {وأقام الصلاة وآتى الزكاة} المفروضة وما قبله في التطوع {والموفون بعهدهم إذا عاهدوا} الله أو الناس {والصابرين} نصب على المدح {في البأساء} شدة الفقر {والضراء} المرض {وحين البأس} وقت شدة القتال في سبيل الله {أولئك} الموصوفون بما ذكر {الذين صدقوا} في إيمانهم أو ادعاء البر {وأولئك هم المتقون} الله.