Medieval castle of Guimaraes was built in 10th century. The main flanking towers at the main gate were built at the end of the 13th century.