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).