Georgian-Ottoman War - was part of The Great Turkish War which lasted from 1686 to 1699 involving a large European Coalition against the Ottomans.
Ottomans suffered a shameful defeat at Vienna in 1686. Multiple Nations, exploited Ottoman weakness and invaded them, this conflict would later be known as The Great Turkish War. King Bagrat VIII of Georgia sensed the opportunity to break free from Ottomans, so he attacked and expelled Ottoman Garrison stationed in his lands, thereby Starting Georgian-Ottoman War.
Invasion of Shirvan
Bagrat and his vassal Hasan-Jalal VI invaded Pashalik of Shirvan and besieged its capital Baku. Pasha of Baku, Mustafa Sirvanoglu, surrendered almost immediately. Bagrat pardoned him and confirmed Mustafa's position as the Governor of Shirvan.
Reconquest of Samtskhe and Armenia
Bagrat advanced into Pashalik of Akhaltsikhe, taking dozens of castles before laying siege to Akhaltsikhe. Mehmed IV sent a relief force but it was defeated and Akhaltsikhe was taken on New years eve of 1687. Bagrat left his garrison in Various castles and left for Armenia where he was met as a hero by the locals.
Helping Poland and Russia
Peter I of Russia who was also at war with the Ottomans asked Bagrat for help against Crimean Khanate, 5,000 men that were sent by Bagrat played a huge role in taking of Azov in 1696. Bagrat also managed to transport some of his troops to assist John III Sobieski of Poland.
End of The War and The Aftermath
War ended in 1699 and Treaty of Karlowitz was signed. Poles forced Ottomans to cede Samtskhe, Shirvan and Armenia to Georgia. Georgia reached its peak in power and became an influential European power. Bagrat soon died and was succeeded by his son Alexander. Alexander began his reign by dethroning and executing Elmurza I of Vainakhia since he had revolted during Georgian-Ottoman War.