God commanded Abraham, and Sarah gave Hagar to Abraham to wife. And why did she do it? Because this was the law; and from Hagar sprang many people. This, therefore, was fulfilling, among other things the promises. Was Abraham, therefore, under condemnation? Verily I say unto you, Nay; for I, the Lord, commanded it. Abraham was commanded to offer his son Isaac; nevertheless, it was written; Thou shalt not kill. Abraham, however, did not refuse, and it was accounted unto him for righteousness. (D&C 132:34-36)