Muhammad ibn al-Hanafiyyah was Amir al-mu'minin's son but called Ibn Hanafiyyah after his mother. His mother's name was Khawlah bint Ja`far. She was known as Hanafiyyah after her tribe Banu Hanifah. When people of Yamamah were declared apostates for refusing to pay zakat (religious tax) and were killed and their women-folk were brought to Medina as slave girls, this lady also came to Medina with them.