The Hebrew Bible contains two sets of rules governing slaves: one set for Hebrew slaves (Lev 25:39-43) and a second set for Canaanite slaves (Lev 25:45-46). The main source of non-Hebrew slaves were prisoners of war. Hebrew slaves, in contrast to non-Hebrew slaves, became slaves either because of extreme poverty (in which case they could sell themselves to an Israelite owner) or because of inability to pay a debt. According to the Hebrew Bible, non-Hebrew slaves were drawn primarily from the neighboring Canaanite nations, and religious justification was provided for the enslavement of these neighbors: the rules governing Canaanites was based on a curse aimed at Canaan, a son of Ham, but in later eras the Canaanite slavery laws were stretched to apply to all non-Hebrew slaves.