Gualdo is a comune (municipality) in the Province of Macerata in the Italian region Marche, located about 90km southwest of Ancona and about 50km southwest of Macerata. As of 31 December 2004, it had a population of 924 and an area of 22.1km2. Gualdo borders the following municipalities: Amandola, Penna San Giovanni, San Ginesio, Sant'Angelo in Pontano, Sarnano. Gualdo in the province of Macerata is situated at 652m above sea level with panoramic views of the Sibillini Mountains. It is between the Salino and Tenonacola Rivers, where the first inhabitants fled in the fourth century from the barbarians invasions. The medieval castle of Gualdo belongs to the Bonifazi of Monte San Martino then to the Brunforte. After a brief period of peace feuds started with the Varano and then the Sforza. Parts of the castle walls and towers remain visible in the 21st century.