The second republic of Genoa began in 1789 and lasted until 1797, when it was transformed into the Ligurian Republic from 1798 to 1805. Genoa was attached to France under the Empire until 1814, when a short-lived Genoese Republic was proclaimed before the definitive attachment to the Kingdom of Sardinia.