Deuteronomy 23:2
NKJV - 2 One of illegitimate birth shall not enter the assembly of the LORD; even to the tenth generation none of his descendants shall enter the assembly of the LORD.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.