Polish–Lithuanian royal election, 1697

On June 17, 1696, King Jan III Sobieski died in his palace at Wilanow near Warsaw. This meant that another free election was necessary, as the Polish-Lithuanian Commonwealth was left without a monarch.

One of the candidates for the Polish throne was Duke of Olawa (Lower Silesia) and son of the late king, James Louis Sobieski. He was initially supported by the Kingdom of France and the Swedish Empire. Also, among his followers were szlachta from Greater Poland, Lesser Poland, and Bishop of Kujawy, Stanislaw Dambski. James Louis Sobieski, however, did not get along with his French-born mother, Marie Casimire Louise de La Grange d'Arquien. The mother and her son argued about properties of John III Sobieski, and as a result, James Louis lost the support of Polish nobility.

Another candidate, Elector of Saxony Augustus II the Strong, was backed by influential and powerful Emperor Leopold I. To win support of Roman Catholic, conservative Poles, Augustus decided to convert from Lutheranism to Catholicism. The conversion took place in Vienna, on June 2, 1697, and this decision won for Frederick the support of Pope Innocent XII.

Main opponent to the Saxon elector was Francois Louis, Prince of Conti, backed by King Louis XIV of France. His candidacy won support of several Polish and Lithuanian magnates, many of whom were bribed by French envoy, Melchior de Polignac. On October 24, 1696, Primate of Poland Michal Radziejowski, who had previously backed James Louis Sobieski, switched sides and declared his support of Francois Louis. Since Radziejowski at that time was the interrex, his decision attracted the nobility, which followed him. Nevertheless, key role in the oncoming election was played by the Tsardom of Russia, which was Polish ally in the ongoing war against the Ottoman Empire (see Great Turkish War). The Russians backed Augustus, who had previously declared that he would continue the war, and who had in 1695-1696 commanded Austrian - Saxon army in its Hungarian campaign. The election of Francois Louis meant quick end to the Polish - Ottoman war, and possibility of a Polish - Russian conflict. The Russians, well aware of this danger, sent large sums of money to the Commonwealth, trying to win the support of Polish - Lithuanian nobility.

The election took place in Wola near Warsaw, on June 27, 1697. By popular support, Francois Louis, Prince of Conti was elected new King of the Commonwealth. This was immediately contested by Augustus the Strong, who declared himself the new monarch. Third candidate, James Louis Sobieski, expressed his support of Conti.

On July 27, 1697, Augustus, backed by Russia, Austria and Brandenburg-Prussia, crossed Polish border near Czeladz in Lesser Poland. He marched towards Krakow, but was not allowed to enter the ancient capital, as the Starosta of Krakow, Franciszek Wielopolski, himself a supporter of Conti, did not let him into the city. The stalemate was quickly solved after Wielopolski had accepted a bribe, but soon another problem appeared. According to the Polish law, the coronation in Wawel Cathedral was to be carried out only with royal insignia, kept in Wawel Treasury. There were eight locks in the door to the Treasury, with eight keys. The keys were kept by eight Senators, out of which six supported Conti. Augustus II and his entourage decided to make a hole in the Treasury wall, leaving the door intact.

On September 15, 1697, Augustus signed the Pacta Conventa, and was crowned new King of Poland, August II, by Bishop of Kujawy, Stanislaw Dambski. Primate Radziejowski refused to recognize the coronation, stating that Conti was the rightful monarch. Radziejowski started the so-called Lowicz Rokosz, which gathered supporters of the Frenchman. Conti himself arrived at the Baltic Sea port of Gdansk on September 26, 1697, with a squadron of six ships commanded by Jean Bart. Since Russia concentrated its army near Lithuanian border, a possibility of an international conflict was real. The situation was solved without foreign intervention, as on November 9, the attack of troops loyal to Augustus forced Conti to abandon his quarters in Oliwa, and to leave Poland. On December 12, 1697, Conti returned to France.

Primate Radziejowski refused to recognize Augustus until spring of 1698, when he received a large sum of money, and was promised a government post.