Answered by Sidi Salman Younas
I was praying a 4 rak’ah prayer and in my last raka`ah i accidently read attahiyatu lillahi before the fatiha…realising my mistake i read the fatiha and surah and then completed my prayer as usual.
salamu `alaykum
I pray you are well and in the best of health.
Reciting the tashahud before the fatiha does not effect the validity or soundness of the prayer, nor does it require a prostration of forgetfulness. (Fatawa Hindiyya, Heavenly Ornaments)
Therefore, your prayer is valid and sound and what you did was correct.
Wasalam
Salman
Approved by Faraz Rabbani
وَلَوْ تَشَهَّدَ فِي قِيَامِهِ قَبْلَ قِرَاءَةِ الْفَاتِحَةِ فَلَا سَهْوَ عَلَيْهِ وَبَعْدَهَا يَلْزَمُهُ سُجُودُ السَّهْوِ وَهُوَ الْأَصَحُّ ؛ لِأَنَّ بَعْدَ الْفَاتِحَةِ مَحِلُّ قِرَاءَةِ السُّورَةِ فَإِذَا تَشَهَّدَ فِيهِ فَقَدْ أَخَّرَ الْوَاجِبَ وَقَبْلَهَا مَحِلُّ الثَّنَاءِ ، كَذَا فِي التَّبْيِينِ وَلَوْ تَشَهَّدَ فِي الْأُخْرَيَيْنِ لَا يَلْزَمُهُ السَّهْوُ ، كَذَا فِي مُحِيطِ السَّرَخْسِيِّ