Prayer: Remembering the Salām After the Form of the Prayer has Broken Up
Practical Laws of Islam as per the teachings of Ayatullah Sistani
Ruling 1093
If a person forgets the salaam of the prayer and remembers it after the form of the prayer has broken up, or if he has intentionally or inadvertently done something that would invalidate his prayer, such as turning his back to qibla, then his prayer is valid.


