Wikipedia
A gastald ( Latin gastaldus or castaldus, Italian gastaldo or guastaldo) was a Lombard official in charge of some portion of the royal demesne (a gastaldia or castaldia) with civil, martial, and judicial powers. By the Edictum Rothari of 643, the gastalds were given the civil authority in the cities and the reeves the like authority in the countryside. Under the Lombard dominion, territories were delimited by giudicati or "judgments" among the several '' gastaldi''. From the immediate region of Parma and of Piacenza, numerous such giudicati survive, which cover the range of Lombard rule. The documents follow the same formalized structure, of which one between the gastaldo Daghiberto and the gastaldo Immo was adjudged by Adaloald, at Ticino, November 615.
As paid officials with direct allegiance to the roving Lombard kings, whose seat was nominally at Pavia, the gastaldi were often in conflict with the dukes, the great Lombard territorial magnates who pursued policies of autonomy. By the 9th century, the powers of the gastaldi had devolved to largely administrative ones. The title gradually disappeared over the final century of Lombard power, surviving only in a few instances, especially in the Mezzogiorno, where ducal Lombard power continued for another two hundred years, for example at Capua, which was included in the Lombard Duchy of Benevento and where the count's title remained gastaldo as late as the 9th century, when Gastaldo Landulfo began strenuously to establish his independence. About 1200, in his Magna derivationes, Uguccione of Pisa included gastradeus [sic., a copyist's slip for gastaldeus] given the meaning "rector loci", the "administrator of a place".
In Milan, the institution of gastaldi endured within the cathedral chapter until the close of the Middle Ages. In the Arsenal of Venice, the gastaldi endured to the arrival of Napoleon, in the form of confraternities of craftsmen in the shipyards; the sign of the carpenters' guild, painted under the direction of Misier Zacharia d'Antonio in 1517 and renewed in 1753, under the gastaldia of Francesco Zanotto gastaldo and company, is in the Museum of Venetian History, Venice.
In Old High German, gastaldus came to denote a steward. Castaldy appears in Middle English with an abstract meaning of "stewardship"; the specific function, however, remained foreign to Anglo-Saxon or Norman institutions.