The Church of São Miguel do Castelo is part of one of the most important monumental ensembles in the country, part of the same nucleus including the Castle of Guimarães and the Dukes of Bragança Palace.
A nationalist historiographic current of thought perpetuated the legend that this was the Church where King D. Afonso Henriques was baptised. This very same legend praised its ancestry and went back in time as regards the date when this temple was built and such information still persists. Hence, the late Romanesque Church of São Miguel would have been part of the primitive palatine complex of D. Mumadona Dias, at the turn of the 9th century to the 10th, and was the main temple of the city of Guimarães in D. Henrique and D. Teresa's time.
Setting this line of interpretation aside, the current Church is a 13th century building, built during the first three decades of that century and at a time when its promoters experienced particularly harsh conditions and were far from the alleged Condal splendour. Its biding took place on the initiative of the Collegiate of Guimarães, during the conflict between this institution and the powerful archbishop of Braga.
Manuel Monteiro, one of our main scholars of Romanesque Art, when highlighting the simplicity of the Church, concluded that this must have been somehow an illegal construction. The little cared ashlars, the almost total absence of decoration, too compact walls, scarce lighting given the existence of small openings, and a very simple floor plan, composed only of a single nave and juxtaposed chancel, point to its eventual illegal nature, despite de later promoting and normalizing action of the archbishop of Braga. And despite its illegal nature, this did not prevent, however, the temple from being consecrated by the archbishop himself in 1239.
In almost total ruin in the 1870s, a commission of prominent inhabitants of Guimarães, from the Martins Sarmento Society, commissioned its renovation, preserving its essential characteristics throughout the modern era. Between 1938 and 1940, the General Directorate of National Buildings and Monuments undertook one of its first restoration actions here, according to the theories of unity of style in vogue at the time. All non-medieval elements were suppressed, especially the baroque altars of the nave. Among the several works carried out at the time, it is worth mentioning the suppression of the bell tower, the fitting of doors and windows randomly opened in the nineteenth century, or the placement of the cantilevers that support the eardrum of the main portal