 After a long period of silence in evidence, in 1014 the monastery of St. Sebastián with its apple orchards (for cider), located in the term of Hernani, is donated to the Abbey of Leire by Sancho III of Pamplona.By 1181, the city is chartered (given fuero) by king Sancho VI of Pamplona on the site of Izurum, having jurisdiction over all the territory between the rivers Oria and Bidasoa.In 1200, the city was conquered by Castile, whose king Alfonso VIII, confirmed its charter (fuero), but the Kingdom of Navarre was deprived of its main direct access out to the sea.