When the Russians captured Rasht in 1722, the ministers ("vizier") of Astara and campaigned to Rasht. They had gathered the 15,000-strong troops to drive them out the Russians. During the invasion of the Caspian coast provinces in 1723, Mir Abbas Beg ruled in Lankaran and Mughan, Musa Khan in Astara, and Bijan Sultan in Qizilaghaj. After the occupation of Baku in August 1723, Mir Abbas Beg wrote a letter to major-general Mikhail Matyushkin (1676–1737) and declared his allegiance to him.