After the death of Ghazi Muhammad, Hamzat Bek was proclaimed imam by the Dagestani
ulama and notables. This was done at the initiative of Muhammad al-Yaraghi, a Naqshbandi sheikh who supported Ghazi Muhammad's
jihad (alternatively, Michael Kemper writes that Hamzat Bek "had himself proclaimed the new
imām"). According to some sources, the choice for a new imam was between Hamzat Bek and Shamil, but Hamzat Bek was chosen since Shamil was still recovering from wounds received at the Battle of Gimry and Hamzat, as a wealthy
janka, had more means to win over supporters. Many of Ghazi Muhammad's followers had abandoned the movement shortly before or after his death, and few local elites initially accepted Hamzat Bek's authority. At first, his rule did not extend beyond Hustal, Ashilta, Gimrah, Tiliq and Mohokh. He used force to bring the communities back under the control of the imamate. In the summer of 1832, he made another incursion into Kakheti and conducted punitive attacks on Avar and
Dargin communities in central Dagestan that had cooperated with the Russians. However, he also tried to negotiate with the Russians. He was invited to negotiations at
Temir-Khan-Shura, but he was distrustful of the Russians since his earlier imprisonment and preferred to send letters. In one of these letters, he proposed peace with Russia as long as they would not interfere with the enforcement of sharia. When this was unsuccessful, he turned to the
shamkhal—the ruler of a
Kumyk principality based in
Tarki—to mediate. Hamzat Bek did not know that the
shamkhal himself had been urging the Russians to attack the imam. These negotiations failed as well and were the last to occur under Hamzat Bek. In October 1833, Hamzat Bek forced the village of
Gergebil to accept his rule, defeating the forces of the
shamkhal, the khan of
Mehtuli and the confederation of Aqusha which had come to Gergebil's aid. Unlike his predecessor and successor, who relied mainly on the
uzden ("free") communities and rarely on the nobility, Hamzat Bek focused on gaining the support of the royal family of the Avar Khanate, with which he had personal connections. The Avar Khanate's de facto ruler Pakhu Bike had sometimes accepted Hamzat Bek's calls to enforce sharia, but she also wanted Russian assistance to preserve the khanate's independence. Additionally, she was pushed by the Russians to oppose Hamzat Bek. In March 1834, Pakhu Bike secretly attempted to organize Hamzat Bek's murder. By early 1834, Hamzat Bek controlled most of the Avar confederacies around the Avar Khanate, including Koisubu, Gumbet, Andi, and Andalal. In the summer of 1834, he besieged Khunzakh for two weeks. Pakhu Bike gave two of her sons to Hamzat Bek as hostages to secure an agreement. On , another son of Pakhu Bike came to negotiate with Hamzat Bek, but a fight unintentionally broke out, causing the deaths of Pakhu Bike's sons Nusal and Umma and their men and the imam's brother and some of his followers. Ḥamzat Bek then stormed Khunzakh and ordered the killing of Pakhu Bike and all of the women of the Avar royal family, except for Pakhu Bike's pregnant daughter-in-law. After this, Hamzat Bek may have claimed the title of Avar khan, trying to combine the authority of the traditional nobility with the Islamic authority of his movement. Hamzat Bek gained as an ally Hajj Tasho, an important leader in Chechnya, which alarmed the Russians. In early September, Hamzat Bek resumed campaigning and unsuccessfully tried to take
Tsudakhar in the Aqusha confederation. Still viewing Hamzat Bek as a dangerous enemy, the Russians planned new operations against the imam. Before this could occur, Hamzat Bek was assassinated on 1834 in front of the Khunzakh Friday mosque by Hajji Uthman, a relative of the Avar ruling family and the brother of
Hajji Murad (the subject of
Leo Tolstoy's famous novella). The assassination was an act of revenge for the destruction of the Avar ruling family, as Uthman and Hajji Murad had been "milk brothers" of the khan. Uthman was killed immediately after assassinating Hamzat Bek. Hamzat Bek was succeeded as imam by Shamil. His grave is located in Khunzakh. == Legacy and reputation ==