In the aftermath of the First Italian War (1494–1498), Pope Alexander VI had, with French assistance, moved to consolidate Papal control over central Italy by seizing the Romagna. Cesare Borgia, acting as Gonfalonier of the Papal armies, had expelled the Bentivoglio family from Bologna, which they had ruled as a fief, and was well on his way towards establishing a permanent Borgia state in the region when Alexander died on 18 August 1503. Although Cesare managed to seize the remnants of the Papal treasury for his own use, he was unable to secure Rome itself, as French and Spanish armies converged on the city in an attempt to influence the Papal conclave; the election of Pius III (who soon died, to be replaced by Julius II) stripped Cesare of his titles and relegated him to commanding a company of men-at-arms. Sensing Cesare's weakness, the dispossessed lords of the Romagna offered to submit to the Republic of Venice in exchange for aid in regaining their dominions; the Venetian Senate accepted and had taken possession of Rimini, Faenza, and a number of other cities by the end of 1503.