The Kingdom of Castile (Spanish: Reino de Castilla, Latin: Regnum Castellae) was a large and powerful state on the Iberian Peninsula during the Middle Ages. Its name comes from the host of castles constructed in the region. It began in the 9th century as the County of Castile (Condado de Castilla), an eastern frontier lordship of the Kingdom of León. During the 10th century its counts increased their autonomy, but it was not until 1065 that it was separated from León and became a kingdom in its own right. Between 1072 and 1157 it was again united with León, and after 1230 this union became permanent. Throughout this period the Castilian kings made extensive conquests in southern Iberia at the expense of the Islamic principalities. Castile and León, with their southern acquisitions, came to be known collectively as the Crown of Castile, a term that also came to encompass overseas expansion.