The Middle Ages. Al-Andalus. Feudalism. The cities or boroughs
After the fall of the Roman Empire and the invasion of the Germanic peoples, a new era known as the Middle Ages began. For a time, Spain was ruled by the Visigoths, who maintained almost the same public treasury as the Romans had created. But feudalism was soon established in Europe, the result of the division of the great Roman Empire into many pieces of land, which were called fiefs, and each one belonged to a lord or noble, who was the feudal lord.
As these were dangerous times of unrest and war, people needed protection and turned to their feudal lords for protection. In return for this protection, they demanded that they fight alongside them in the frequent wars and pay large tributes, usually in the form of crops, wine, oil, and animals, since money—the coins in circulation—was scarce at that time. The power of these feudal lords over people's property and even their lives was almost absolute (difference between slaves, vassals and citizens). No one could engage in commerce or practice a trade without their authorization, and the poorest people were the serfs, who were like slaves forced to work the land without any rights.
In Spain, as you know, the Muslim people who arrived from Africa in the 8th century lived in much of the territory for several centuries. Their treasury became very rich, because in addition to the income of the emir or the caliph (who were like their leaders), they established taxes on crops, merchandise, herds or lands and also direct taxes that non-Muslim people living in their territory had to pay. There were two very important taxes that were later also demanded by Christians: customs duties ( almojarifazgo ) and the gabelas that were paid when buying and selling something.
Over time, people began to unite, protest, and rebel against the power of feudal lords and kings, setting conditions for the payment of taxes that the kings sometimes had to accept, as was the case with the Cortes that met in Spain or with the example of the Magna Carta in England, according to which taxes must be accepted by the people who are to pay them.
Furthermore, people began to escape the power of the feudal lords, and cities began to emerge, along with a new social class of artisans, merchants, and bankers, known as the bourgeoisie. With the growth of cities and the new needs that arose in them, the municipal Treasury became important, independent of that of the king, collecting taxes (for example, the alcabala ) to channel water, to make streets or to build its walls.