In the Medieval Kingdom of Portugal, the Cortes was an assembly of representatives of the estates of the realm – the nobility, clergy and bourgeoisie. It was called and dismissed by the King of Portugal at will, at a place of his choosing. Cortes which brought all three estates together are sometimes distinguished as Cortes-Gerais (General Courts), in contrast to smaller assemblies which brought only one or two estates, to negotiate a specific point relevant only to them. Portuguese monarchs had always called intermittent "king's courts" (Curia Regis), consultative assemblies of feudal nobles and landed clerics (bishops, abbots and the masters of the Military Orders) to advise on major matters. This practice probably originated in the protofeudalism of the 6th-century Visigothic Kingdom. But, during the 13th century, with the growing power of municipalities, and kings increasingly reliant on urban militias, incorporated towns gained the right to participate in the king's court. The Cortes assembled at Leiria in 1254 by Afonso III of Portugal was the first known Portuguese Cortes to explicitly include representatives of the municipalities. In this, Portugal was accompanying the pattern in neighboring Iberian kingdoms (e.g. the Kings of León admitted town representatives to their Cortes in 1188). Medieval Kings of Portugal continued to rely on small assemblies of notables, and only summoned the full Cortes on extraordinary occasions. A Cortes would be called if the king wanted to introduce new taxes, change some fundamental laws, announce significant shifts in foreign policy (e.g. ratify treaties), or settle matters of royal succession, issues where the cooperation and assent of the towns were necessary. Changing taxation (especially requesting war subsidies), was probably the most frequent reason for convening the Cortes. As the nobles and clergy were largely tax-exempt, setting taxation involved intensive negotiations between the royal council and the burgher delegates at the Cortes.