In the 10th century, the Countess Mumadona Dias, assumes the government of the Condado Portucalense. The constant attacks by the Moors and Normans led her to have a fortress built to guard and defend the village. Thus appears the primitive Castle of Guimarães.