Mu'adh bin Jabal, Abu Ubaidah bin Jararah, Ubadah bin Samit and Shaddad bin Aws narrated that the Messenger of Allah (ﷺ) said:
“If a woman kills someone deliberately, she should not be killed until she delivers what is in her womb, if she is pregnant, and until the child's sponsorship is guaranteed. And if a woman commits illegal sex, she should not be stoned until she delivers what is in her womb and until her child's sponsorship is guaranteed.”