Deuteronomy 23:1
He that is wounded in the stones, or hath his privy member cut off, shall not enter into the congregation of the LORD. He that is wounded in the stones, or hath his privy member cut off, shall not enter into the congregation of the LORD.
Deuteronomy is the fifth and last book of the Pentateuch, composed mainly of three addresses given by Moses shortly before his death. The verse falls within chapters 5 through 26, which review the law for the new generation. The name of the book means second law or duplicate of the law.
The phrase congregation of the Lord is rendered in the Greek translation by ekklesia for the assembly or congregation of Israel, showing that the congregation of God in the Old Testament is the same called-out people as the church in later times. The exclusion commanded is from the privileges of citizenship, especially holding office and serving as rulers, not from heaven or from being saved. Its purpose was to keep godless people from coming in and ruling over God's people and to keep those with bodily defects from being held in contempt, while God's promises of eternal salvation still embrace them.
The verse excluded eunuchs from the congregation of Israel, and it marks the restriction contrasted with promised inclusion under the new dispensation. That inclusion gives eunuchs who keep the Sabbaths and hold to the covenant a place and an enduring name among God's people, welcomes Gentiles also, and is illustrated by the bringing in of a eunuch described in Acts 8. The chapter was misconstrued by teachers to teach hatred of enemies.
That misreading was exposed in the Sermon on the Mount, where the formula Ye have heard that it hath been said is set against It is written to distinguish human tradition from Scripture. There the command is to love, bless, and pray for those who oppose, hate, slander, or mistreat. The command to love enemies is not new doctrine but part of God's law, which stands firm until heaven and earth pass away.