The Treaty of Blois of October 1505 was the second of two treaties of Blois that restored peace after the Second Italian War of 1499-1503.
The Second Italian War fell into two halves. In the first Louis XII successfully invaded Milan, and then repulsed an attempt by the deposed Duke Ludovico Sforza to retake the city. In the second the French and Spanish jointly invaded the kingdom of Naples, before falling out over the division of the spoils. The Spanish emerged as the victors in this fight, winning key battles at Cerignola (26 April 1503) and the Garigliano (28-29 December 1503). The French were forced out of Naples, which remained under Spanish rule for the rest of the period of the Italian Wars.
After these defeats Louis was ready for peace. In September 1504 he agreed a first treaty of Blois, with the Emperor Maximilian. This was based on a marriage between Louis's daughter Claude, the heiress to Brittany, and Maximilian's grandson Charles, the future Charles V. Louis agreed to give Claude the duchies of Milan and Burgundy as her dowry. In return Maximilian agreed to invest Louis as Duke of Milan.
In April 1505 Louis suggested adding Naples to this dowry. Naples had been in Spanish hands since 1503, so this would have been a way of accepting the status quo without having to officially abandon his own claim.
The war was finally officially ended by the second Treaty of Blois, of October 1505, in which Louis made peace with Ferdinand II of Aragon. At the time Ferdinand was about to marry Germaine of Foix, probably in the hope of produce a male heir of his own to follow him in Aragon, Sicily and Naples. Louis agreed to give Germaine Naples as part of her dowry, although if the new couple failed to produce an heir then the claim would revert to France. Ferdinand agreed to pay Louis 1,000,000 ducats in compensation.
Neither of the two treaties of Blois really produced anything. In 1506 public pressure helped convince Louis to marry his daughter Claude to Francis of Angouléme, the heir presumptive of France. This mean that the treaty of 1504 was void, but also ensured that Brittany would become a permanent part of France.
The treaty of 1505 lasted rather longer, but in 1516 Ferdinand died without producing an heir with Germaine. As a result the French revived their claim to Naples, but only for a few months. In 1516 the new French king, Francis I, agreed the Treaty of Noyon with the equally new Charles I of Spain (the future Charles V). Once again the French agreed to abandon their claim to Naples though a marriage alliance with Charles, and once again the marriage failed to take place. The French thus continued to press their claim to Naples for most of the period of the Italian Wars, and even fought a number of often disastrous campaigns in the south of Italy, but never regained control of the area.