Siege of Guimarães

The Siege of Guimarães was a military siege that took place between the Portuguese separatist forces and the Leonese forces of Afonso VII, who marched into the County of Portugal in 1127, and attacked the Castle and city of Guimarães, the seat of King Afonso Henriques and the Portuguese nobles who had revolted that year against the authority of Countess Teresa.

Background
After the death of Count Henry, his widow D. Teresa took over the government of the county during the minority of her son Afonso Henriques. In 1125, he knighted himself in Zamora Cathedral.

Resentful of Teresa's closeness to her influential lover, the Count of Trastámara, Fernão Peres de Trava, and her favouritism towards the Galician nobility, who supported her plans to reign as an independent queen, in 1127 the Portuguese nobility of Entre Douro e Minho revolted and declared themselves in favour of the infante Afonso Henriques, who was sixteen or seventeen years old at the time.

Faced with the revolt of the Portuguese nobles, King Alfonso VII gathered his forces and, at the head of his troops, travelled to Portugal in person to restore his aunt to full rule of the county. The king's campaign had the support of Diego Gelmires, the bishop of Compostela, as well as the majority of the Galician nobility.

The Siege
Once the Portuguese borders had been crossed by Alfonso VII's troops, sieges and battles ensued. The lands of Guimarães, whose castle was the seat of the counts of Portugal, had declared themselves in favour of infante Afonso Henriques and Alfonso VII focused on this castle of central importance, where Afonso Henriques was at the time, and headed there quickly. The end of the campaign would come in Guimarães.

Once the city was surrounded and unable to resist, the supporters of King Afonso Henriques decided to ask Afonso VII for peace on behalf of the young infante.

Through an agreement negotiated by Egas Moniz, King Afonso VII abandoned the siege without taking possession of the castle, in exchange for a guarantee that the Portuguese nobles would lay down their arms and Afonso Henriques would fulfil his duties as a vassal of León in the future, with Egas Moniz remaining as guarantor. On the one hand, this meant that serious reprisals had been avoided, and on the other, it meant that the revolt had failed, as Queen Teresa remained in government.

Teresa also suffered reprisals from Afonso VII and lost some lands she had acquired north of the River Minho.

After the order had been restored, and with little interest in the disputes between King Afonso Henriques and his mother (Teresa), after both had recognised the King of León as their suzerain, the latter withdrew from the territory and went back to Galicia.

Consequences
Afonso VII's campaign in Portugal lasted six weeks. It had a profound impact, as resentment grew among the county's society against Teresa and her Galician favourite, who was blamed for the military failure, and those who had previously tolerated the Count of Trastâmara now saw him as an obstacle. Among Afonso Henriques' supporters, however, hope for the future was growing.

King Afonso VII was unable to pacify the Portuguese nobles for long. The following year, they rebelled again against Teresa and Fernão Peres de Trava and defeated their troops in the Battle of São Mamede, being driven out of Portugal. Afonso Henriques then took over the reins of the county government.