Vakhtang agreed to aid the "meliks"; he sent Davit Bek, reportedly one of his most capable officers, together with some 2,000 Armenian soldiers. Davit made the fort of Halidzor his base of operations. With the support of the local peasants and the "meliks", Davit managed to defend the Armenian-inhabited areas from the Muslim tribes. Even though initially Davit's main enemy were the Iranians, he soon came to the conclusion that it was the Ottoman Turks who posed a much greater danger. In 1727, in order to put a halt to the Ottoman approach in the area, king Tahmasp II appointed Davit as the governor of the area, and gave him the right to administer the area as a vassal Armenian principality under Iranian control.