Imam Hasan al-Basri, may Allah have mercy on him, regarding a pregnant woman who begins to experience pain and sees blood for the child, said: She will not pray. Imam Darimi, may Allah have mercy on him, said: She should pray until she gives birth.
Hadith Takhrijاس قول کی سند صحیح ہے۔ دیکھئے: [مصنف ابن أبى شيبه 213/2]
Brief Explanation
(Commentary on Ahadith 955 to 983)
There are differing opinions among the Companions (Sahabah), the Followers (Tabi'in), and the esteemed jurists (fuqaha) regarding a pregnant woman or a woman whose menstrual blood has ceased. Those who considered the blood as menstrual (hayd) forbade her from performing prayer (salah), and those who did not consider it as menstrual instructed her to purify herself and perform prayer. And Allah knows best what is correct.