the department was inhabited in prehistoric times, as evidenced by the presence of caves with cave paintings and dolmens. in historical times it was inhabited by basque people; they settled on the northern side of the pyrenees and in the valleys below. in 415 it became part of the kingdom of the visigoths, until their defeat at the hands of the king of the franks in 507.