Venice became rich on trade, but the guilds in Venice also produced superior silks, brocades, goldsmith jewelry and articles, armour and glass in the form of beads and eyeglasses. However, Venice's attention was diverted from its usual trade and maritime position by the delicate situation in Romagna, then one of the richest lands in Italy. Romagna was nominally part of the Papal States but effectively divided into a series of small lordships that were difficult for Rome's troops to control. Eager to take some of Venice's lands, all neighbouring powers joined in the League of Cambrai in 1508, under the leadership of Pope Julius II. The pope wanted Romagna, emperor Maximilian I Friuli and Veneto, Spain the Apulian ports, the king of France Cremona, the king of Hungary Dalmatia, and each of the others some part. The offensive against the huge army enlisted by Venice was launched from France. On 14 May 1509 Venice was crushingly defeated at the Battle of Agnadello, in the Ghiara d'Adda, marking one of the most delicate points of Venetian history. French and Imperial troops were occupying Veneto, but Venice managed to extricate itself through diplomatic efforts. The Apulian ports were ceded in order to come to terms with Spain, and Pope Julius II soon recognized the danger brought by the eventual destruction of Venice (then the only Italian power able to face large states like France or Ottoman Turkey). The citizens of the mainland rose to the cry of "Marco, Marco", and Andrea Gritti recaptured Padua in July 1509, successfully defending it against the besieging Imperial troops. Spain and the pope broke off their alliance with France, and Venice also regained Brescia and Verona from France. After seven years of ruinous war, the Serenissima regained her mainland dominions up to the Adda. Although the defeat had turned into a victory, the events of 1509 marked the end of the Venetian expansion.