After the wars in Garfagnana (1604-1620) conducted with success against the estensi, the city of Lucca spent a period of peace and prosperity until the arrival of Napoleon's troops in 1799. Lucchese policy chose the adoption of some ideal to preserve their freedom: stay on the margins of the international events, avoid insidi and disputes with neighbors, creating a powerful defensive system to deter possible invasions. Most of the State's financial resources were engaged in the construction of the last walls finished in 1645.
The fertility of the country, the economic fabric of small and medium-sized enterprises and the social peace protected by rulers allowed the maintenance of well-being of the population. In 1628, Lucca became a definitively oligarchic Republic: the General Council established the Golden Book of 224 households that could access at maximum charges, following the example of Venice. This impoverished and stiffened the political system straining to the progressive closure of cities and by the commercial decommit adopted in the past.
The European situation related to a protectionist policy forced lucchesi to move on squares and increasingly difficult. From the 16th century onwards, many capitals were re-invested in agriculture with land reclamation and cultivation extended to the whole territory of the Republic which is further enriched by aristocratic villas. Keeping this fruitful perspective, in the eighteenth century, the excellent condition of finance to assess the extinction of the debt. The Government began to deal with some reforms of timidly enlightenment: in 1758 an editorial piracy allowed Octavian Dave and his staff to print the first Italian Edition of the Encyclopèdie of Diderot and d'Alembert. In addition, the University was inaugurated in 1790.
For its cosmopolitan character, due to business, commerce and culture, Lucca has never had only a local dimension. During the Congress of Vienna (1815) Lucca became a duchy (Ducatus Lucensis) under Maria Luisa of Bourbon and then under his son Charles Louis. Lucca became the capital until it passed under the Grand Duchy of Tuscany in 1847. The city experienced a period of great economic prosperity in the second half of the nineteenth century, especially in the agro-food, textile and paper industries thanks to the local water resources.