Islamic prophet Muhammad), worked together with the Russian commander M. A. Matiushkin. By the end of 1735, the reconquest of northern and western Iran was completed, being led by the Iranian military leader Nader. It was also during this period that he set his sights on the throne, as he believed his campaigns had stabilised the country and brought him enough fame. On 8 March 1736, he was crowned the new shah of Iran, marking the start of the Afsharid dynasty. Afsharid and Zand period Mir-Abbas Beg kept up his relations with the Russians even after they pulled out of Iran. In order to demonstrate his loyalty to Nader Shah, he sent his son Jamal al-Din as a hostage to his court. Due to his dark complexion, Jamal al-Din earned the nickname Qara ("the Black") Beg. He rose to important posts in Nader Shah's army and was assigned the task of putting down Kalb Hoseyn Beg's uprising in southern Talish in 1744. The murder of Nader Shah in 1747 led to the fragment of his empire; in the same fashion as the other rulers in the Southern Caucasus, Jamal al-Din (who had succeeded his father) established himself as a semi-independent ruler, marking the start of the Talysh Khanate, which used Lankaran as its capital. Jamal al-Din preserved his fathers correspondence with Russia, sending a letter to its empress Catherine II () that pledged his allegiance to her and offered the Russian troops access to his domains. The Zand shah of Iran, Karim Khan Zand () was informed of this by Zohrab Beg, one of the grandees of Talish. As a result, Jamal al-Din was sent to a prison in Shiraz, the Zand capital. Karim Khan soon reversed his decision after he had discovered that Zohrab Beg had made an agreement with his rival Hedayat-Allah Khan, who ruled Gilan. Jamal al-Din was thus reinstated in Talish as its governor, being given the title of khan. After destroying Zohrab's army and seizing control of Uluf and Dashtvand, Jamal al-Din now directed his attention towards Astara. He captured and killed its ruler Shoja al-Din, but failed to establish his rule in Astara, as the city was given to Shoja al-Din's son by Karim Khan in an attempt to restrict Jamal al-Din's authority. The latter, however, was able to conquer a number of towns in Talish and gain control over most of the region.