Since the second half of the 16th century the Sapieha family of Lithuania and Belarus had risen to prominence and attained a premier rank among the magnate families of the Polish–Lithuanian Commonwealth. Over the course of the 17th century, the family came to monopolize most of the top government offices of the Grand Duchy of Lithuania. While these offices were not hereditary, the Sapiehas ensured that they remained within the family. Over time this contributed to growing resentment among Lithuania's other magnate clans and opposition to the Sapiehas began to form in various quarters. The Sapiehas attempts to control local politics through the sejmiks and their arrogation of other nobles' lands also led to dissatisfaction among rank-and-file szlachta. The volatile situation was furthered acerbated by the actions of the King of Poland, Augustus II the Strong. Augustus aimed to transform the weak position of the Polish-Lithuanian monarch into one based on the then current Western model of an absolute monarch. He saw the potential conflict in Lithuania as a possible excuse for an intervention which could then be utilized to strengthen royal power, as well as a means of weakening powerful magnate families in the region. Augustus allowed the Grand Hetman of Lithuania, Jan Kazimierz Sapieha the Younger to conscript further forces for the Sapieha's private army, while at the same time he issued proclamations calling on the lesser nobility to defend their ancient privileges. The anti-Sapieha coalition consisted of members of the Radziwiłł, Pac and Ogiński families, and had the support of medium and lesser nobles. It was further strengthened in April 1700, when Sapieha's soldiers and courtiers mistook a procession of the Princely Wiśniowiecki family in Vilnius, for that of the anti-Sapieha Kociełł family, attacked it and wounded two of its most prominent members Michał Serwacy Wiśniowiecki and Janusz Wiśniowiecki. As a result, the Wiśniowieckis joined the anti-Sapieha cause, with Michał Serwacy given the overall command of the coalition.
Battle
Initial military engagements, at Lipniszki and in a skirmish on the Ashmyanka River, were favorable to the Sapiehas who commanded well trained professional troops against irregular forces of the szlachta. In October the szlachta gathered in a camp near the town of Olkieniki. Sapieha forces, under Michał Franciszek Sapieha, left Vilnius in early November and arrived near Olkieniki in the middle of the month. Older accounts of the battle give the strength of the szlachta forces at around twenty thousand and that of the Sapiehas at eight or nine thousand. Newer sources list lower figures; twelve thousand for the szlachta and around three thousand for the Sapiehas. It is generally agreed that the Sapieha troops were of superior quality. The Sapieha forces also had eight pieces of artillery, which the confederates lacked. Last minute negotiations and an attempt at a truce was made by Bishop of VilniusKonstanty Kazimierz Brzostowski, who while a long time Sapieha opponent, was genuinely worried about the extent of destruction that the civil war was going to cause in Lithuania. Brzostowski, accompanied by bishop sufragan Jan Mikołaj Zgierski, met with the Sapiehas at a tavern in nearby Leipalingis. The details of the proposed truce are unknown but the conditions were rejected by Sapiehas, who declared that things will have to be "settled with sabres". A contemporary poem described the various regiments and their commanders on the anti-Sapieha side. The counties of Ashmyany, Lida, Bracław, Troki, Grodno, Upita, Nowogródek, Słonim, Wołków, Witebsk, Orsza, Brześć Litewski, Pinsk, Mścisław, Minsk, Samogitia and Połock all supported the confederates, while the counties of Vilnius, Ukmergė, Kaunas, Mozyr and Rzeczyca County supported the Sapiehas. The confederates placed their infantry in the center, the majority of the szlachta were on the right or in reserve, and the left wing was taken up by hired Wallachian cavalry. Wisniowiecki placed his troops between Valkininkai and Leipalingis, while Oginski led his troops through the local forests in a wide encircling maneuver. The Sapiehas also placed their infantry in the center, their rajtars on the left, with the right taken up by Tatar troops.
Aftermath
In the aftermath of the battle, a drunken mob of szlachta, encouraged by the Canon of Vilnius, Krzysztof Białłozor, whose brother had been executed by the Sapiehas the previous year, murdered many of the Sapieha leaders, including several prominent members of the family itself. Most notably, a mob lynched Michał Franciszek Sapieha, who was kept after the battle imprisoned in a nearby abbey. The battle and the subsequent slaughter marked the end of the dominance of the Sapiehas in the Polish–Lithuanian Commonwealth in general, and in the Grand Duchy of Lithuania in particular. Jan Kazimierz Sapieha managed to escape capture and fled to the Duchy of Prussia. One of the participants on the Sapieha side was the then relatively unknown nobleman Stanisław Poniatowski, who would become an aide to Charles XII of Sweden and the father of Stanisław August Poniatowski, the last King of Poland. Poniatowski was spared from the slaughter which followed the battle because of his low rank, young age, and relatively low status at the time.