In a narration by Ghiyath ibn Ibrahim, from Imam Jafar ibn Muhammad Al-Sadiq عليه السلام from his father, Imam Muhammad ibn Ali Al-Baqir عليه السلام, that Imam Ali ibn Abi Talib عليه السلام said: "If a woman apostasizes from Islam, she is not to be killed but is to be imprisoned forever."