During the next century Galician noblemen took northern Portugal, conquering Coimbra in 871, thus freeing what were considered the southernmost city of ancient Galicia.