The state was recognized by Napoleon by the Treaty of Tolentino, in 1797 and by the Congress of Vienna in 1815. In 1825 and 1853, new attempts to submit it to the Papal States failed; and its wish to be left out of Giuseppe Garibaldi's Italian unification in the mid-nineteenth century was honoured by Giuseppe in gratitude for indiscriminately taking in refugees in years prior, many of whom were supporters of unification, including Giuseppe himself and 250 followers. Although faced with many hardships (with his wife Anita who was carrying their fifth child dying near Comacchio before they could reach the refuge), the hospitality received by Giuseppe in San Marino would later prove to be a shaping influence on Giuseppe's diplomatic manner, presaging the themes and similar language used in his political correspondences such as his letter to Joseph Cowen.