After Ismail’s (alayhis salam) mother had died, Ibrahim came to see his family whom he had left near Zam-zam. Ismail (alayhis salam) was not at home when Ibrahim (alayhis salam) arrived, but his wife was. She did not know who Ibrahim (alayhis salam) was. When Ibrahim (alayhis salam) asked her about how they were managing, she started complaining about how difficult life was and how poor they were. Ibrahim (alayhis salam) told her to give her husband greetings from him and to tell him to change the threshold of the gate to his house.
When Ismail (alayhis salam) returned, he sensed that something unusual had happened and he asked his wife if anyone had been there. Then she told him what had happened and what Ibrahim (alayhis salam) had said to her. Ismail (alayhis salam) told her that the stranger had been his father, and that he had ordered Ismail to divorce her.
How did Ismail (alayhis salam) know what Ibrahim (alayhis salam) was talking about? A threshold is the sill of a door or gate, the part that one steps on when one enters a house. If the threshold is rotten, the house is not strong. Ismail’s (alayhis salam) wife was the rotten threshold because of her whining, complaining ways. Had she remained as Ismail’s (alayhis salam) wife, his entire household would have been weakened. The wife, as mother of a man’s children, is the foundation of his family for many generations to come, and she must be made of good material in order to fulfill her purpose well.
Sometime after Ismail (alayhis salam) had taken another wife, his father Ibrahim (alayhis salam) again came visiting and again found no one but the wife at home. However, this time when he asked her how they were doing, she cheerfully answered that they were prospering and she gave thanks to Allah for all their blessings. She offered Ibrahim (alayhis salam) meat and water, and he asked for Allah’s blessing on all their meat and water. When he left, he told her to give his regards to her husband and to tell him to keep the threshold of his gate.
When Ismail (alayhis salam) returned home he asked if anyone had visited. She told him all about the nice old man and the piece of advice he had given in his message to Ismail (alayhis salam). From this message Ismail (alayhis salam) knew that his father approved of the new wife and had advised Ismail (alayhis salam) to keep her with him.
Again some time had passed when Ibrahim (alayhis salam) wished to see his son. He found Ismail (alayhis salam) sharpening his arrows at the Zam-zam well, and they exchanged a warm father-son greeting. This time Allah had given Ibrahim (alayhis salam) an order and Ibrahim (alayhis salam) needed Ismail’s (alayhis salam) help to fulfill it. Ismail (alayhis salam) agreed immediately to help, before he even knew what was required of him. Allah had ordered Ibrahim (alayhis salam) to build a house on the hillock where Ismail (alayhis salam) had been left as a baby with his mother, a place which was higher than the land surrounding it. And so it was that Ibrahim (alayhis salam) and Ismail (alayhis salam) built the Ka’ba. Ismail (alayhis salam) brought the stones and Ibrahim (alayhis salam) put them in place. When the walls became too high, Ibrahim (alayhis salam) stood on a rock and Ismail (alayhis salam) handed the stones up to him. As they worked they kept repeating: “Our Lord! Accept this service from us, for Thou art the All-Hearing, the All-Knowing.” (al-Qur’an 2:127). That is how the Ka’ba came to be built.
You can read about Ismail (alayhis salam) and his father in Sahih al-Bukhari IV: 583-584 and in the Qur’an 2:125-129.