The country was occupied on 17 October 1739 by the legate (Papal governor) of Ravenna, Cardinal Giulio Alberoni, but independence was restored by Pope Clement XII on 5 February 1740, the feast day of Saint Agatha, after which she became a patron saint of the republic.