 This already suggests that, in order to discuss the early history, it is necessary to distinguish two aspects of set theory: its role as a fundamental language and repository of the basic principles of modern mathematics; and its role as an independent branch of mathematics, classified (today) as a branch of mathematical logic. Both aspects are considered here. 