Anagni (Italian pronunciation: [aˈnaɲɲi]) is an ancient town and comune in the province of Frosinone, Latium, central Italy, in the hills east-southeast of Rome. It is a historical and artistic center of the Latin Valley.
Anagni still maintains the appearance of a small medieval hill town (424 meters above sea level), with small twisting streets and steep lanes. It is built inside Roman boundary walls.
The built-up area initially included only the acropolis (the north-east zone comprising the Cathedral, Tufoli gate, and Piazza Dante) and partially defended by walls in opus quasi-quadratum (almost squared work). Under Roman domination, the map of the city changed, starting from the modification of the boundary walls. The archaic inhabited places spread out protected by the so-called Servian walls, made with stone blocks placed in alternate lines and dating back to the beginning of the 3rd century BC. Most of the boundary walls have been subjected to rebuilding and restoration in the course of the first millennium AD; but the most remarkable re-arrangement took place in the 16th century.
The town is divided into eight districts, or contrade of Castello, Cerere, Colle Sant'Angelo, Piscina, Torre, Trivio, Tufoli and Valle Sant'Andrea.
It counts the hamlets (frazioni) of Ara Stella, Castellone, Cucugnano, Collacciano, Faito, Osteria della Fontana, Pantanello, San Filippo, San Bartolomeo, San Filippo, Tufano-Vallenova and Vignola-Monti.
The first human settlements date back to more than 700,000 years, according to the dating of some Palaeolithic hand-made fragments recently recovered; while the historical sources (Livy, Virgil, Servius, Silius Italicus) mention Anagni only once, the city had already been introduced into the Roman orbit. Several objects made of bone and flint stone and also two human molars and incisors belonging to fossil Homo erectus have been found in Fontana Ranuccio.
The people who lived in those places were of the Hernici, migrated - as it seems - from the Aniene valley and descendant from the Marsi (Marsians) (or from the Sabines), at least according to the ethnical term deriving from the Marsian herna ("stone"), that is: "Those who live on the stony hills". Only two words remain of their language: Samentum, a strip of sacrificial skin, and Bututti, a sort of funeral lament.
Anagni was an important city and spiritual centre of the Hernici. The city was the seat of temples and sanctuaries, where, in the 2nd century AD, many linen codices containing sacred Etruscan writings were still well-conserved, according to the testimony of Emperor Marcus Aurelius. Of these writings, there is a sole survivor, which is the Liber Linteus.
Recent archaeological discoveries have revealed cultural and economic relationships between the Hernici and the Etruscans around the 7th century BC, perhaps it was commercial center, which conducted trade with Magna Graecia. It is speculated that, at the foot of the hill on which the city stands, there was the so-called Maritime Circle, where the Hernican held their national council. In 307 BC, the Hernici, with the exception of Aletrium (Alatri), Verulae (Veroli), and Ferentinum (Ferentino) declared war on Rome. After suffering setbacks the Hernici offered unconditional surrender. In 306 BC the towns which had not joined the war remained independent, while “Anagnia and such others as had borne arms against the Romans were admitted to citizenship without the right to vote. They were prohibited from holding councils and from intermarrying, and were allowed no magistrates save those who had charge of religious rites.”  Anagni preserved her religious autonomy and strategic importance.
In Imperial times, many emperors spent their summers in Anagni to escape the heat of Rome, the most notable ones being Marcus Aurelius, Septimius Severus, Commodus, and Caracalla. By the end of the Roman Empire, a deep political and economic crisis caused the demographic collapse of Anagni's population. The suburban zones, which during the Roman Age had grown along the most important roads of the area, were depopulated; the lower parts of the city were abandoned; vegetation gradually took possession of several spaces, substantiated by the fact that, in the 10th century, an inner zone of Anagni was marked by the place-name Civitas Vetus (Old Town).
Anagni has been a diocese, the seat of a bishop, since the 5th century. In the 9th century, the first Cathedral was built on the ruins of the temple dedicated to the Goddess Ceres. The agricultural reconquest, begun in the 10th century, was supported by the ecclesiastic power, which allowed the secular lords to exploit the land and to build fortified settlements for their peasants, favouring new economic and demographic growth.
During the 10th and the 11th centuries, the city strengthened its link with the papal court: In fact, the popes began to consider the old capital city of the Hernici a safer and healthier spot compared to Rome, which was the place of frequent epidemic diseases. For this reason, even if the presence of factions inside the town could not be prevented, Anagni remained faithful to the Roman Church, becoming one of the favourite residences of the popes, in the 12th and 13th centuries.
As a result, several events connected with the struggle between Papacy and Empire took place in the city, including some of the most important political events in these two centuries. In 1122, Callistus II promulgated the basic Bull of the Concordat of Worms; in 1159, Pope Adrian IV received in Anagni, during the siege of Crema, the legates of Milan, Brescia, and Piacenza (the building of the Civic Palace was assigned to the Ambassador of Brescia, Architect Jacopo da Iseo); Adrian died here later the same year. In 1160, Alexander III excommunicated the Emperor Frederick Barbarossa in the Cathedral; in 1176, after the Battle of Legnano, the same pope received the imperial legates, with whom he elaborated the Pactum Anagninum ("Anagni's Agreement"), premise to the peace, which was achieved in Venice in 1177.
The 13th century was the golden age of the city. In one hundred years, Anagni produced four popes, three of them members of the Conti family. The first one to ascend to the papal throne was Lotarius Conti, who, as Innocent III (1198–1216), was one of the outstanding personalities of his century, together with Frederick II of whom he favoured the coronation as Emperor of Germany and Saint Francis whose first Rule he approved. Innocent III is credited with the elaboration and the most complete expression of the theocratic doctrine, the principle according to which absolute rule over every earthly power is ascribed to the Pope. He died in 1216, leaving the Church at the historical peak of its power.
Innocent III's efforts were taken up by Gregory IX, who belonged to the powerful Family of Conti di Anagni. On September 29, 1227 in Anagni's Cathedral he excommunicated Emperor Frederick II, who had abandoned the Crusade that the Emperor himself had proclaimed. The suggestive ceremony took place by the lights of the torches, firstly shaken, then thrown on the ground and finally blown out by the prelates.
In September 1230, after the reconciliation, Gregory IX received Frederick II in Anagni, who in the meantime had been able to conquer, without bloodshed but by means of his great diplomatic ability, both Jerusalem and Nazareth.
During his pontificate, Alexander IV (1254–1261), Gregory IX's relative and Anagni's third pope, had to face the heated ecclesiological dispute raised by the University of Paris against the Mendicant Orders. The leader of this dispute, William of Saint-Amour, had published an anti-mendicant pamphlet, De periculis novissimorum temporum (On the Dangers of the Last Days) between the fall of 1255 and spring of 1256. Alexander officially condemned the work in Anagni on October 5, 1256. In 1255 Clare of Assisi was officially canonized in Anagni.
In 1265 a provincial Chapter at Anagni of the Roman province of the Dominican Order assigned Thomas Aquinas as regent master thereby transforming the existing studium conventuale at the Roman convent of Santa Sabina into the Order's first studium provinciale featuring as an innovation the study of philosophy (studia philosophiae). This studium is the forerunner of the 16th century College of Saint Thomas at Santa Maria sopra Minerva, and the 
Anagni is connected to the events in the life of Boniface VIII, the fourth Pope to be born in the city, and a member of the powerful Caetani Family. He was elected after the abdication of Celestine V, but opposed by French Cardinals and by the powerful Colonna Family.
In 1300, Boniface VIII, set up the first Jubilee and founded the first Roman university, but also began a feud with the King of France, Philip the Fair, who had assigned himself the right to tax the French clergy. In response, in 1302 Boniface delivered the Bull Unam Sanctam, which assigned to the Pope absolute supremacy over the earthly power of kings. In anger, Philip organized an expedition to arrest and help remove Boniface from his office.
On 7 September 1303, the king's advisor Guillaume de Nogaret and Sciarra Colonna led a band of two thousand mercenaries on horse and foot. They joined locals in an attack on the palaces of the pope and his nephew at Anagni. The Pope's attendants and his nephew Francesco all soon fled; only the Spaniard Pedro Rodríguez, Cardinal of Santa Sabina, remained at his side. The palace was plundered and Boniface was nearly killed (Nogaret prevented Sciarra Colonna from murdering the pope). Still, Boniface was held prisoner and starved of food and drink for three days. This incident is called the Outrage of Anagni. According to a legend, during the imprisonment, the Pope was slapped by Sciarra Colonna with his gauntlet: the episode is called the Schiaffo di Anagni ("Anagni's Slap"). The imprisonment of the Pope inspired Dante Alighieri in a famous passage of his Divine Comedy (Purgatory, XX, vv. 85-93), the new Pilate has imprisoned the Vicar of Christ.
The people of Anagni rose against the invaders and released Boniface. The pope pardoned those captured. He returned to Rome on 13 September 1303.
Despite his stoicism, Boniface was clearly shaken by the incident. The old pontiff, already suffering, developed a violent fever and died in Rome on 11 October 1303. In A Distant Mirror: The Calamitous Fourteenth Century, Barbara Tuchman states that his close advisors would later maintain that he died of a "profound chagrin".
After the death of Boniface VIII, both the splendor of Anagni and the dreams of power of the Caetani Family collapsed and the doctrine of papal suzerainty of Kings was weakened.
The transfer of the papal court to Avignon marked for Anagni the beginning of a long period of decline, which lasted through the entire 15th century. The town was sacked by the troops of Duke Werner von Urslingen in 1348, and depopulated.
In 1556, Anagni became a battlefield in the conflict between Pope Paul IV and King Philip II of Spain, when it was besieged by the Spanish army under the Duke of Alba. After a bombardment by the Spanish, the papal troops abandoned their positions and the Spanish put the town to the sack on 15 September.
The damage suffered by the town, in particular by the town walls, were accentuated by the fortifying works carried out in 1564 under Pope Pius IV. Around 1579 a short period of refluorishing began, thanks to Cardinal Benedetto Lomellino, bishop and governor of the city.
The planned works are made under the sign of a recovery of the architectonic structures and the medieval constructive and decorative style. The great architectonic and urbanistic reconstructions began around 1633. The works concerning the ecclesiastic buildings that determined the present look of the churches in Anagni are very interesting. The new architectonic canons that, however, left the existing Gothic Roman elements untouched are reflected in the transformation of the buildings. Also the ancient noble mansions embellished by magnificent portals were restructured and, toward the end of the 19th century, also the cultural level of the city rose again, thanks to the growing welfare. In fact, in this period, other institutions and congregations were born, which, together with the constitution of various schools, made Anagni an important centre of study thanks to its long cultural tradition.
In 1890, in the presence of the Queen, the Queen Margaret's National Boarding-house for the education of the orphan-girls of grammar schools teachers was opened.
In 1897, the Jesuit Collegio Leoniano, entitled to the pontiff Leo XIII, was also opened. Finally, in 1930, the Prince of Piedmont's Boarding-house was built for the sons of local body personnel.
Since World War II, the territory of Anagni has become an important industrial settlement.
Anagni was also the summer residence of the popes until recently. It was similar to what Castel Gandolfo in the Alban Hills is to today's popes.
The Cathedral, dedicated to Saint Mary, was built in Romanesque style during the years 1071–1105, with Gothic-style additions in the mid-13th century. The crypt contains the tombs of St Magnus of Anagni, the patron of the city, and of St Secundina of Anagni. The frescoes covering all the walls and ceiling are among the best preserved examples of Romanesque/Byzantine art in Italy, and form a single iconographic scheme, which includes natural philosophy, saints, the Apocalypse, and the Old Testament Ark of the Covenant. The unrestored Cosmati floor is in excellent condition.
On the same level as the crypt is the Oratory of Saint Thomas (Becket), with less well preserved frescoes. The museum possesses a Becket reliquary chasse (one of around four dozen still around) and what is claimed to be a Becket miter. The western wall has a contemporary statue of Pope Boniface VIII looking out over the Piazza Innocenzo III.
To the south of the town is the imperial Villa of Villa Magna built by Antoninus Pius, still called Villamagna, where a consortium comprising the University of Pennsylvania, the British School at Rome and the Soprintendenza ai Beni Archeologici del Lazio initiated its first campaign of excavation in 2006. These excavations, which continued in 2007 and 2008, have begun to reveal a large and highly decorated building devoted to wine production as well as the remains of the monastery of S. Pietro in Villamagna.
The language, or dialect, of Anagni (called Anagnino) can be categorized as Northern Ciociaro. The definite articles (the) are Ju-masculine singular (pronounced like the English word you), La-feminine singular, Ji-masculine plural (pronounced Yee), and Le-feminine plural (pronounced like the English word Lay). The indefinite articles (a, an) are nu-for masculine words and na for feminine words. The final vowel is always pronounced in the plural form and usually in the singular form (this is in comparison with Southern Ciociaro and Neapolitan where the final vowel of a word is usually slurred, unaccented). For those who know Italian, the Anagnino dialect preserves the u's found in Latin; for example instead of the Italian con (with), the people of Anagni use cu from the Latin cum. There are many other differences between the Italian and Anagnino. Some examples include the deletion of some n's, l's, and r's commonly found in Italian. For linguistic historians, the dialect is especially important for studying pre-Roman Italic languages and also the formation of Italian. Like Latin, the v's are pronounced like u's; for example vino (wine in Italian) is uino in Anagnino. Today's Standard Italian is influenced by German, French, Arabic, Greek, and Spanish, while the dialect of Anagni and the others of central Italy (south of Rome, west of the Apennines, and north of Campania) are relatively considered solely Latin and pre-Italic, due to the limited settlement of foreign people in the area.
Anagni's coat of arms include an eagle over the lion and the letters S.P.Q.A. The coat of arms symbolizes the forced union of Anagni and the Roman Republic in 306 BC. The lion symbolizes the native Hernican people, and the eagle on top of the lion symbolizes the Romans conquering the Hernici. The letters S.P.Q.A. stands for Senatus Populusque Anagninus ("the Senate and the People of Anagni"). It is a model after the ancient acronym S.P.Q.R. for Rome (Senatus Populusque Romanus, "the Senate and the People of Rome"). The two keys above the eagle signify the city's papal history. The imperial crown above the crest and the imperial robe signifies Anagni was a famous and important residence of the Roman Emperors. The label is in Latin, HERNICA SAXA COLVNT QVOS DIVES ANAGNIA PASCIT.