A papal conclave was held from 2 to 28 September 1823 to elect a new pope to succeed Pius VII, who had died on 20 August. Of the 49 members of the College of Cardinals, all but four attended. On the final ballot, the conclave elected Cardinal Annibale della Genga, the cardinal vicar of Rome. After accepting his election, he took the name Leo XII.

Pius VII, who had been elected in 1800, had an unusually long pontificate, during which the Catholic Church had faced, in the French Revolution and its aftermath, a severe attack on its power and legitimacy. Pius VII himself had been a prisoner of Napoleon in France for six years.

Description

During Pius VII's papacy, the cardinals had tended to divide into two groups, the zelanti and the '. The zelanti were more radically reactionary than the ' and wanted a highly centralised Church and vehement opposition to the secularising reforms that had resulted in France. The ', though anti-liberal, were much more moderate and favoured a conciliatory approach to dealing with the problems that new ideologies and the incipient Industrial Revolution were creating. The leader of this faction was Pius VII's cardinal secretary of state, Ercole Consalvi, but the zelanti wanted a much less moderate pontiff and they set fervently to this task from the time of Pius VII's death.

The length of Pius VII's papacy had a significant influence, because of the forty-nine electors who participated in the conclave, only Giulio Maria della Somaglia and Fabrizio Ruffo were already cardinals when Pius VII was elected in 1800. Forty-seven of the forty-nine electors had had no experience electing a pope.

A number of cardinals were thought at the beginning of the conclave to be possible successors to Pius VII. Cardinal Antonio Severoli was at first seen as the most likely papabile, but the veto from Francis I, Emperor of Austria ruled him out when he seemed to have a reasonable chance.

Francesco Castiglioni then emerged as the most likely candidate. The deceased pope Pius VII had in fact seemingly endorsed Castiglioni by having referred to the latter as Pius VIII, and indeed the candidate who was eventually elected predicted during the conclave that Castiglioni would someday reign under that name (as he did, succeeding the elected Leo in 1829). Castiglioni lost support in the 1823 conclave when the zelanti cardinals came to realize that he was quite close to Consalvi.