Respected scholars, assalamu alaykum wa rahmatullaahi wa barakaatuhu. My question is regarding the numbers of Rak'ahs (units of prayer) of the obligatory prayers. Some stories about this are very common in India like, for example, it is said about the 'Asr prayer that it is because Yunus, peace be upon him, offered four Rak'ahs after coming out from the stomach of the fish. The Maghrib prayer would be because Prophet Dawood (David), peace be upon him, was once offering four Rak'ahs but could not reach the fourth due to his crying out of fear of Allaah. Do these kind of stories contain any truth regarding the mentioned prayers as well as the other three?
All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
We do not know of any basis in the Sharia for the justification of the number of Rak'ahs mentioned in those stories; nothing had been reported to this effect in the Sunnah of the Prophet . Rather, some scholars mentioned those stories without their chain of narration. The Hanafi scholar Badr Ad-Deen Al-‘Ayni cited a similar account to what the questioner mentioned in his book Nukhab Al-Afkaar fi Tanqeeh Mabaani Al-Akhbaar fi Sharh Ma‘aani Al-Aathaar 3/350-351, the edition published by the Qatari Ministry of Awqaf. He cited on the authority of some scholars that the reason for performing the Fajr prayer as two Rak‘ahs was that our father Aadam (Adam), was the first to perform the Fajr prayer as two Rak‘ahs; that the Thuhr prayer was four Rak‘ahs because Prophet Ibraaheem (Abraham) was the first to perform it as such, and he mentioned the reason for performing it as four Rak‘ahs; and the that ‘Asr prayer is four Rak‘ahs because Prophet Yoonus (Jonah) was the first to perform it as such, and that the reason for performing it as four Rak‘ahs was that he was inside four layers of darkness: the darkness of his fault, the darkness of the deep sea, the darkness of the night, and the darkness of the whale’s stomach. He also mentioned that the first to perform the Maghrib prayer as three Rak‘ahs was ‘Eesa ibn Maryam (Jesus), and not Daawood (David), may Allaah exalt their mention, as the questioner mentioned. Also, the ‘Ishaa' prayer was performed by Moosa (Moses) and he mentioned the justification. Everything that he mentioned has no evidence in the Sharee'ah, as far as we know. However, such matters fall into the category of the knowledge that does not harm if one does not know it and does not benefit if one knows it. So do not waste your time in such matters any further.
For more benefit, please refer to fatwa 82181.
Allaah knows best.
You can search for fatwa through many choices