Since the first attempts of Sultan Selim III to modernise the Ottoman Army, Prussia has provided it with military know-how. Colonel von Götze, secret negotiator of the Prussian king and military attaché, already came in 1798 on invitation from the Sultan to inspect Turkish units. Once Sultan Mahmud II, for the same purpose, abolished the old-fashioned Janissary corps in 1826, it was again Prussia who helped reform the military: future Field MarshalHelmuth von Moltke, at the time Captain of the Prussian General Staff, and Lieutenant von Berg from the First Special Regiment, were detached to Istanbul in 1835, where Moltke stayed until 1839. Moltke's fame led to the creation of a myth surrounding his role in the establishment of a historic relation between Turkey in Germany, where in fact his role was rather minor, his main value being in the memoirs he wrote and which became the primary lecture for all Prussian and German officers who followed him to the Ottoman Empire. In 1844, Prussian Colonel Kuczkonski arrived in Istanbul, where he helped implement secrets plans designed by the Sultan and aiming at reforming the police in the Turkish capital city. Sultans Abdulmecid and Abdulaziz did continue reforming the Army with the help of Prussian know-how, but they preferred hiring retired officers who trained and commanded Turkish units, prominently during the Crimean War. Finally, Sultan Abdulhamid II introduced the official Prussian Military Committees in the Ottoman Empire. In his and Bismarck's time, Germany appeared to be the only European Power that not interested in expanding into Ottoman territory. After 1880, Abdulhamid began a sustained policy of bringing German military and civilian officers to his realm, and of putting them in a leading position in the effort of reforming the Army. As a result, several German officers arrived between 1882–83, including Colonel Kähler as Head of Commission, followed in this position between 1883-1895 by Major Baron Colmar von der Goltz, who would stay in the Ottoman Empire almost uninterruptedly until his death in April 1916 in Baghdad. Kähler, as aide-de-camp to the Sultan, as well as the other Germans became highly-paid Ottoman officers, but the body that paid their salaries was controlled by European bankers, and they served without cutting their ties with the German army. Von der Goltz was most influential by reorganising the military education and infrastructure. He was the only German officer who managed to influence Turkish generals, who viewed with displeasure the aloof attitude of Kähler's group. Von der Goltz also managed to influence the decisions of the Ottomans when it came to arm deals towards buying German, rather than British weapons. The German military mission became the third most important command center for the Ottoman Army. The initial contact was established during the Balkan Wars by Grand VizierSaid Halim Pasha and Minister of WarAhmed Izzet Pasha. The KaiserWilhelm II sent the mission of General Colmar Freiherr von der Goltz, which served two periods in Turkey within two years. The German mission was accredited from 27 October 1913 to 1918. General Otto Liman von Sanders, previously commander of the 22nd Division, was assigned by the Kaiser Wilhelm II to Constantinople. Germany considered an Ottoman-Russian war to be imminent, and Liman von Sanders was a general with excellent knowledge of the Imperial Russian Army. The Ottoman Empire was undecided about which side to take in a future war involving the German Empire, British Empire, French Third Republic and Russian Empire, eventually joining the Central Powers led by the German Empire. The 9th article of the German Military Mission stated that in case of a war the contract would be annulled.