Sarai said to Abram, "Since the Lord has prevented me from bearing children, go to my slave; perhaps I can have children by her." And Abram agreed to what Sarai said.
References for Genesis 16:2
So Abram's wife Sarai took Hagar, her Egyptian slave, and gave her to her husband Abram as a wife for him. [This happened] after Abram had lived in the land of Canaan 10 years.
He slept with Hagar, and she became pregnant. When she realized that she was pregnant, she looked down on her mistress.
References for Genesis 16:4