The County of Coimbra (Portuguese: Condado de Coimbra) was a political entity instituted as a military unit of defense in the borders of the Kingdom of Galicia in the Iberian Peninsula, and in what is today central Portugal. It was established in 871. However it was reconquered by the Moors of Al-Mansur in 987, transforming the northern County of Portugal in the new defensive border territory. It was made of the lands of Coimbra, Viseu, Lamego and Feira.