In the Middle Ages Bitonto was a fief of several baronial families, before it passed permanently in the thirteenth century to the Acquaviva, who took their name from their stronghold at Acquaviva delle Fonti: The Acquaviva were later dukes of Atri, and their minor signory of Bitonto was raised to a marquisate in 1464 by the King of Naples, Ferrante di Aragona in favour of Giovanni Antonio Acquaviva; on his premature death it passed to his brother, the successful and cultivated condottiero Andrea Matteo Acquaviva, who exchanged it in 1487 for the marquessate of Ugento, which he subsequently lost. In 1552 the citizens paid for the city's freedom the considerable sum of 66,000 ducats.