The Castle of Guimarães, built in the 12th century, was important in the formation of Portugal as the first King of Portugal, D. Afonso Henriques, was born and lived there. It was also where he fought for and declared Portugal's independence from Leon in 1127, defeating his mother Queen Teresa's forces the following year in the Field of S. Mamede near the castle. The castle remains a national monument and important historical symbol of Portugal.