"Then his Lord chose him and turned to him in forgiveness" for that sin, "and guided," meaning: he died upon guidance.