At the very crisis of the war Louis had been entangled in a futile negotiation. Since the end of 1500 Philip, Archduke of Austria, had been busying himself with the double object of securing his dominions in the Netherlands against France, and of obtaining for his infant son, the Duke of Luxemburg, afterwards Charles V, additions by marriage to those vast possessions to which he was already heir presumptive. The outcome of these efforts was a contract of betrothal at Lyons (August, 1501) between Charles and Claude, the daughter of Louis XII: a provisional treaty at Trent between Maximilian and Louis (October, 1501) agreeing to this marriage, and stipulating the investiture of Milan for Louis: an interpretation of the same arranged between Philip and Louis in December of the same year at Blois, but never accepted by Maximilian: and finally a treaty concluded by Philip with Louis at Lyons (April 5, 1503), in the name of Ferdinand and Isabella, by which the whole of the kingdom of Naples was to be given to the infant pair. This last treaty was never ratified by Ferdinand and Isabella, who asserted that Philip had exceeded his powers, and Gonzalo paid no heed to it. But Louis showed less prudence. Relying on the treaty, he deferred, in the critical month of April, the despatch of a body of troops which he had ready in Genoa. It is true that the threatening movements of the Swiss, to whom Louis was obliged at this moment to cede Bellinzona, gave an additional reason for delaying what had been already too long delayed.
The disasters and humiliation of the year called for a great effort. The French raised three armies, one of which was directed on the Spanish frontier of Navarre and another against Roussillon, while the third was intended for the recovery of Naples. The Italian expedition was entrusted to la Tremouille. The northern powers of Italy remained to all appearance faithful. Ferrara, Mantua, Bologna, Florence furnished contingents. In August the French were beginning to move. The Pope and Cesare vacillated long between the parties, but at the crisis they were both stricken down by illness, and on the 18th of August the Pope expired. The ambassadors and the cardinals succeeded in freeing the town from the armed men of rival factions, Orsini, Colonna, Cesare; but Gonzalo was at Castiglione, and the French advanced guard at Nepi, so that the election took place as it were under the shadow of war. It wisely ended by giving the prize to neither of the foreign nations. The new Pope, Pius III (Francesco Piccolomini), treated Cesare with indulgence and left him in a position to bargain with both Spain and France. However, his final adhesion to the latter power proved to be of little value, while both Orsini and Colonna were thereby driven into the arms of Spain.
The French advance was delayed by the illness of la Tremouille, whose place was ultimately taken by the Marquis of Mantua. Finally they moved forward by the Latin Way, which was blocked by Gonzalo, holding San Germano, Aquino and Roccasecca. Joined by Allegre, from Gaeta, they attacked Roccasecca, but were beaten off and obliged