It was thus a high, compact and massive complex dominating the plain of Gualdo Tadino.
Founded around the tenth century, as evidenced by ancient documents that origin from the Counts of Nocera, the castle was owned by the Atti, Lords of Foligno, who held it until 1198 when it passed under the jurisdiction of Pope Innocent III. At the beginning of the thirteenth century was the center of disputes between Gubbio and Perugia. In 1240, Frederick II, who stayed there for a long time, undertook the expansion and restoration of the fortress as well as the construction of the city walls, with four gates and seventeen towers.
A plaque affixed on one of the towers testifies the stay by Biordo Michelotti in 1394. Since then it was also called "Arx Maior Terre Gualdi" to distinguish it from the captain of the palace of the people called "Arx Minor". In 1434 the castle was given in vicariate to Count Francesco Sforza by Pope Eugenius IV; at the end of the same century it was transformed into a clandestine mint by the castellan of that period, Philip of Arcioni from Rome.
From 1513 up to 1587 the fortress housed the Autonomous League of Cardinals that held the fate of the city, giving it a period of great splendor.
In order to fulfill the role of residence, the interior was modified and decorated with frescoes, of which, however, only a small part remains; during the mandate of the first cardinal legate, Antonio Ciocchi of Monte San Savino (1513-1533), the new aqueduct was built crossing the Flea fortress.
After 1587, with the entry of Gualdo Tadino in the District government of Perugia, the fortress became the official residence of the apostolic official until 1798.
In the nineteenth century it was destined to be women's prison for women of "immorality". From the unification of Italy until 1985 it was a mens' prison.
In the early '90s, the works of consolidation and restoration began, and they permitted the discovery of the primitive chapel of Sant'Angelo de Flea, at the base of the keep. They were also highlighted beautiful frescoes of the fourteenth and fifteenth century.
In 1996 the restoration was finished and the fortress was finally returned to the city and tourists. Since 1999 it has housee the Civic Museum, a multimedia center, while inside the church there is the Antiquarium with archaeological finds documenting the population of the Gualdo territory from prehistoric times to the Middle Ages.