Beirut was twice occupied during the Russo-Turkish War of 1768–1774 by squadrons of the Imperial Russian Navy's Mediterranean Fleet, first in June 1772 and second from October 1773 to early 1774, as part of its Levant campaign. Russia's main objective in this campaign was to assist local forces led by Egypt's autonomous ruler, Ali Bey al-Kabir, who was in open rebellion against the Ottoman Empire.
Russia, led by Catherine the Great, was pressing the Ottomans in Europe. Ali took advantage of the Empire's preoccupation with Russia to declare Egypt's independence; in 1771 he sent an army led by Muhammad Bey Abu al-Dhahab to occupy Ottoman territory in the Levant. Abu al-Dhahab unexpectedly returned to challenge Ali for control of Egypt. Ali requested Russian military assistance against both his rival and the Ottomans. When this aid, in the form of a small Russian squadron, arrived in the region, Ali had already fled Egypt and taken refuge in Acre, the power base of his ally, Zahir al-Umar. After helping repel an Ottoman offensive on Sidon, the Russian squadron sailed for Beirut. They bombarded the town in June 1772 and occupied it from June 23 to 28.
Ali requested further assistance from Russia to recover Egypt from Abu al-Dhahab. The Russians had recently entered a period of truce with the Ottomans, constraining their involvement in the region. They did, however, promise Ali a large squadron. Impatient, Ali set out for Egypt with a small force that was defeated near Cairo; he was imprisoned and died a few days later. When the Russian squadron arrived in June 1773 and learned of Ali's fate, its commander allied with Zahir and the Druze chieftain Yusuf Shihab. The latter had agreed to pay the Russians a tribute in exchange for their liberation of Beirut from Jazzar Pasha, Shihab's insubordinate vassal whom he had recently appointed as governor of the town. The bombardment of the town began on August 2, and Jazzar surrendered after two months, on October 10. A few hundred Albanian mercenaries were left as occupiers.
The occupations are of debatable historical importance. Despite their brevity, they marked the first time in over 250 years that Beirut was ruled by a power other than the Ottomans. It also marked the first occasion on which Russian rule was imposed over an Arab city.