Gani bej Toptani (c.1859 – 21 December 1898) was an Ottoman Albanian officer and adjutant of Sultan Abdülhamid II. After a short military career in Janina, he was exiled to Harpoot, but was soon called to Constantinople to serve under Sultan Abdülhamid II as his personal bodyguard. He was the elder brother of Essad Pasha Toptani, who would later ascend as a political and military figure, both in the Ottoman Empire and later in independent Albania. Gani Toptani was killed in 1898 in the Pera district of Constantinople after a conflict that would cause political tension. Three years later, his brother Essad would also carry out an assassination attempt as revenge against Cavid Bey, a member of the Imperial Council and also the son of Grand vizier Halil Rifat Pasha, who is thought to have ordered Gani's assassination.
 Gani Toptani was born in c.1859 in the so-called Sarajet e Toptaneve in the town of Tirana, which at that time was the center of a kaza of the Sanjak of Durrës, which itself was a subdivision of the Vilayet of Shkodra. His parents were Ali Bey Toptani, a local leader and member of one of the most prominent and wealthiest landowning families in central Albania, the Toptani family, and Vasfije hanëm Toptani (née Alizoti), from an important family of beys of Gjirokastër. Gani Toptani was the first son in a family of five children, three daughters and two sons. His sisters, Nejre, Sabushe, and Merushe; as was common at the time, would marry prominent figures with the same status enjoyed by the Toptanis. His only brother, Essad Pasha Toptani ascended as a political and military figure in the Ottoman Empire. He later became a central figure in the Albanian political scene, becoming the 3rd Prime Minister of Albania.
 Gani Toptani is often described by contemporary and modern authors as a "wicked", "unscrupulous", and "ruthless" man. He had gained such a reputation during his early youth by causing trouble in the areas of Tirana and Krujë both to the population and to the local authorities. These actions were not left unheard nor unreported to the central authorities of the empire. Soon measures were taken to limit his troublemaking activity. And as it was common at that time, such individuals were transferred by order of the sultan himself away from their areas of influence to where such "skills" would serve the empire and the sultan's regime. A well-known policy that Abdülhamid II used whenever he needed to establish order and tranquility in certain provinces by offering people such as Gani Bey offices in civil administration or ranks and military decorations. This would also be known as the Hamidian policy and it was undoubtedly through this policy that the two Toptani brothers would benefit, one by being appointed commander of the Gendarmerie in Janina (today Ioannina) and the other adjutant to the sultan himself. Little is known about his military career but apparently, he participated in the Greco-Turkish War of 1897 in which he would be mentioned as a participant in the burning of Christian villages on the outskirts of Janina.
 In Janina, his deeds would soon compel the foreign consuls to put pressure on the sultan for his punishment. His punishment would not take too long as Gani Toptani would soon be exiled to Damascus, and then to Harput in Anatolian Turkey. However, the sentence did not seem to last long and he would be summoned to Constantinople to serve under the sultan. He would be appointed to the Fesli Zuhaf, otherwise known as the Albanian Imperial Guard Battalion because it consisted solely of Gheg Albanians and Gani Bey made no exception. While Maiyyet-i Seniyye Rifle Division, otherwise known as "Arnavut Tüfekçiler" (Albanian Riflemen) consisted mainly of Tosk Albanians. Both wards would serve several security tasks, such as that of the personal guard of the sultan himself and his harem, to the royal Yıldız Palace, the parliament at Çırağan Palace, as well as the most important religious leaders. The battalion was commanded by another well-known Albanian, Mirliva Tahir Pasha from Krajë, Sanjak of Shkodra. During this time it seems that Gani Bey had also won the sympathy of the sultan himself because he had been appointed as one of his few adjutants. He was so close to the sultan that he would be considered one of his most trusted men. Some even accused him of murder and other atrocities at the discretion of the sultan. When the sultan with his imperial carriage moved through the city, Gani Bey would always be seen riding to the right guarding the ruler. Inside the Yıldız Palace, it always stood outside the door where the sultan was.
 It seemed that all this closeness to the sultan would not be left untapped to his benefit by Gani Toptani. He would use all this power to commit extortion, asking for bribes and demanding tributes, often embarrassing the sultan himself with his behavior.
 On the evening of 21 December 1898, in a Pudding Shop in the Pera district of Constantinople, Gani Toptani was shot dead after a verbal conflict, apparently on the spot. The 39-year-old at the time was an adjutant to the Sultan and one of his most trusted men. Initially, the police would be reluctant to announce the name of the shooter but rumors would allege that he was Hafız Ömer Pasha, then intendant of the sultan's chamberlain Ragib Bey. The alleged killer left for Greece, where he stayed hidden for several years. Apparently Hafiz Pasha had no personal reason to kill Gani Bey, with whom he had been friends for months. Some contemporary newspapers began to cite "crime of passion" as the reason for the murder, where a quarrel broke out because of a woman. The allegations about the causes of the murder would be various but the real motives were never revealed. According to other mentioned causes on newspapers of the time and writings of contemporary authors, the murder had happened accidentally after excessive jokes between them, while others assumed that it was due to broken deals. However, the rumors which got the most attention implied that the assassination had a political background given the persons involved. The claims were that Hafiz Pasha was merely a tool in the hands of quite high circles in Constantinople.
 The murder of Gani Bey, despite the great commotion made at the beginning, soon began to be neglected and not talked about anymore. But the rumors about who could be behind its organization were not left unheard in Tirana. There was a belief that the murder had been committed by order of the Grand Vizier, and perhaps even higher. Suspicions fell on Ibrahim Cavid Bey, a member of the Imperial Council and also the son of Grand vizier Halil Rifat Pasha. Cavid Bey, along with his father did not hesitate to criticize the employment of so many Albanians in key roles and the growing influence upon sultan. In a report sent to Abdülhamid II, he expressed wonderment on why the Turkish ruler favored the Albanians. The sultan himself did not take this well at all, but nevertheless hesitated to take action, and even decorated him on 5 October 1899. Meanwhile, preparations for revenge had begun, and such would not be long in coming.
 On Saturday, 7 October 1899, around 4.pm near the Galata Bridge, Cavid Bey had just dismounted from the carriage accompanied by his family to take the steamer for a voyage. When suddenly he was shot several times by a stranger and left dead on the spot. The event created a great panic in one of the most frequented areas of Constantinople. However, on the run, an officer managed to arrest the suspect. He was a 49-year-old man dressed in typical Albanian clothes, who was later identified as Haxhi Mustafa Merlika, otherwise known by the nickname "Xhiu i Fajes". He was a villager from Krujë, region that was under the control of the Toptanis. According to the investigation, Xhiu had been in Constantinople since 19 August and was staying in a guesthouse near the Sirkeci railway station. He refused to plead guilty before the court but it was clear that he was not there by chance. In Albania, the relationship between Xhiu i Fajes and Gani Toptani was well known. As would be explained years later by Xhiu's nephew Mustafa Merlika, his uncle had been a servant of the Toptanis, and especially of Gani Toptani with whom he had established a close friendship. According to him, Xhiu had gone to meet Essad Pasha days after Gani Bey's assassination and had sought approval to carry out revenge for his master according to Albanian traditional laws of Gjakmarrja (lit. 'blood-taking'). He sought support and help by him on how to act in such a big city unknown to him. Essad initially refused, seeing it as too risky but later agreed to cover the costs and everything needed to organize the assassination.
 
The legal process became extremely difficult as Albanians filled the courtroom creating noises and ovations, often interfering also to the sultan, who tended to make concessions only to maintain order in the peripheries of the empire. On the day of the final court decision on 10 February 1900, no Albanian was allowed to enter the courtroom. Haxhi Mustafa Merlika was sentenced to death for the crime committed, but later the sultan spared his life and the sentence was converted into life imprisonment. In an article of those days by the French newspaper Le Sémaphore de Marseille the events would be described as follows: Haxhi Mustafa Merlika would be released about 8 years later following the Young Turk Revolution. In Albania, he was welcomed as a hero, to whom folk songs were composed and which are still sung to this day.