Joseph was engaged to Mary but faced a dilemma when she became pregnant since he was not the father. An angel appeared to Joseph in a dream and told him to marry Mary anyway, as the child was conceived by the Holy Spirit. Though difficult, Joseph obeyed God without question by taking Mary as his wife. He further demonstrated obedience through his actions, such as fleeing to Egypt with Mary and Jesus when warned in another dream. Joseph modeled faithful obedience to God through both his inward trust and outward actions.