The Republic of Venice had encroached on papal rights in Venetian territories by independently filling vacant episcopal sees, subjecting clergy to secular tribunals and generally disregarding the ecclesiastical jurisdiction of Julius II in other ways. In 1509, Julius II joined the League of Cambrai, a coalition formed to restore lands that had been recently conquered by Venice to their original owners. Julius II censured Venice with an interdict and deployed the armies of the Papal States, along with the combined forces of the League of Cambrai, to Venetian-occupied Romagna. There, Venice suffered a complete defeat at the Battle of Agnadello, on 14 May 1509. In 1510, Venice negotiated with Julius II, who withdrew from the League of Cambrai and removed the censure in exchange for terms that included Venice agreeing to return disputed towns in Romagna, to renounce claims to fill vacant benefices, to acknowledge jurisdiction of ecclesiastical tribunals over clergy and their immunity to secular tribunals including exemption from taxes, to revoke all unauthorised treaties made with towns in the Papal States, to abandon appeal to a future general council against the papal bans and to concede free navigation of the Adriatic Sea to Papal States subjects.