Maliks Muwatta Book 29, Hadith Number 83.

Section : Idda of Widows when Pregnant.

Yahya related to me from Malik from Abdu Rabbih ibn Said ibn Qays that Abu Salama ibn Abd ar-Rahman said that Abdullah ibn Abbas and Abu Hurayra were asked when a pregnant woman whose husband had died could remarry. Ibn Abbas said, “At the end of two periods.” Abu Hurayra said, “When she gives birth, she is free to marry.” Abu Salama ibn Abd ar-Rahman visited Umm Salama, the wife of the Prophet, may Allah bless him and grant him peace, and asked her about it Umm Salama said, ”Subaya al-Aslamiya gave birth half a month after the death of her husband, and two men asked to marry her. One was young and the other was old. She preferred the young man and so the older man said, ‘You are not free to marry yet.’ Her family were away and he hoped that when her family came, they would give her to him. She went to the Messenger of Allah, may Allah bless him and grant him peace, and he said, ‘You are free to marry, so marry whomever you wish.'”