The first Count of Castile was Rodrigo in 850, under Ordoño I of Asturias and Alfonso III of Asturias. In 931 the county was unified by count Fernán González, who made his lands subject to a hereditary succession, independent of the kings of León.