 At the next election (1724) he was himself proposed for the papal chair, and secured ten votes at the conclave that elected Benedict XIII.Benedict's successor, Clement XII (elected 1730), named him legate of Ravenna, where he erected the Porta Alberoni (1739), a magnificent gateway that formerly provided access to the city's dockyards, and has since been moved to the entrance of the Teatro Rasi.That same year, the strong and unwarrantable measures he adopted to subject the grand republic of San Marino to the papal states incurred the pope's displeasure, and left a historical scar in that place's memory.