The walls of Corinaldo pass for the finest medieval walls in the Marche, nine hundred and twelve metres of them, and they are not the original walls. The town had made itself a free comune at the end of the eleven hundreds; in 1248 it had to submit to neighbouring Jesi, then it took its autonomy back, then it followed a Ghibelline citizen of its own, Nicolò Boscareto, imperial vicar by appointment of Louis the Bavarian. The papal reconquest was heavy: on the eighteenth of August 1360 the army of Innocent VI, led by Galeotto I Malatesta, razed Corinaldo to the ground. Seven years later Urban V authorised the rebuilding, and in 1367 the town was made again literally from nothing, walls included, with the swallowtail merlons they still have; the southern stretch, more linear and with corbels, was added by the Sienese military architect Francesco di Giorgio Martini and finished in 1490. The rest is told by the arms: red and silver, the colours of Jesi, because Jesi had ruled it; and the papal keys, because in the fourteen hundreds the people of Corinaldo bought their freedom back, paying a heavy tribute to the Malatesta and putting themselves under the direct rule of the Church.
In 1517 Francesco Maria Della Rovere, the deposed duke of Urbino, tried to annex Corinaldo and the lands around it; after twenty-three days of siege the townspeople forced him to withdraw, and pope Leo X, for the loyalty shown, raised Corinaldo to the rank of city. Halfway up the Piaggia, the stairway of a hundred and four steps, there is a well everybody calls the polenta well, and the story attached to it is this: a man was climbing with a sack of maize flour on his shoulders, and when he got there he set it on the rim to catch his breath, the sack fell in, and he lowered himself into the well to get it back. Here, on the sixteenth of October 1890, Maria Goretti was born, and the sanctuary carries her name; here the sixteen and seventeen hundreds left the octagonal church of the Suffragio built on top of the old keep, the painter Claudio Ridolfi who lived and died at Corinaldo, and two organs by Gaetano Callido, one of them a gift to his daughter, a cloistered nun, in the very rooms that hold the picture gallery today. And here, on the eighth of December 2018, at one in the morning, in the Lanterna Azzurra discothèque, somebody sprayed an irritant gas: people ran for the back exit, the balustrade of the emergency ramp gave way, and six people died and fifty-nine were injured.