First, there was hardly an Ottoman Empire in the early 1920s. The Ottoman Parliament was disbanded by the Allied forces in January 1920 and a new Parliament in Ankara led by Mustafa Kemal Pasha convened in April 1920. In name, the Empire and the Sultan still existed until 1922, but their force was severely limited. I hardly think an answer in the form of “the last Ottoman Sultan, Vahdeddin, sort of disliked the communists” suffices. I will try to look at how different groups reacted to communism and, inseparably linked to this, to the foundation of the USSR.
Some context now. When the October Revolution took place, the Ottomans were in a war against the Russians and were losing. The Russian Army took several Muslim-majority Ottoman districts in the Northeast and East by 1917. Suddenly, these chaps with a red star on their hats appeared and declared they want peace and no more invasion! The Soviet government kept its word by signing the Treaty of Brest-Litovsk on the 3rd of March 1918 according to which the Russian-occupied Ottoman towns and cities would return to the Ottoman Empire. Both the Ottoman government and the public were enthusiastic about the possibility of this from the time of revolution onwards. Tanin, the quasi-official mouthpiece of the ruling Committee of Union and Progress (the CUP) in the Empire published many positive pieces in 1917 and 1918 on the Revolution precisely for this reason. Talat Pasha, the minister of interior affairs, stated on Tanin that the Revolution fostered hopes of a rethinking of the Russo-Turkish relations. Until the end of the WW1, the Ottomans were interested in communism and the USSR mainly because of this pragmatic reason. To be clear, there were active socialist movements in the Empire from the late 19th century onwards. But the growing interest in communism in 1917-18 can only be explained by the pragmatic facto.
Despite the withdrawal of Russia, the Ottomans went on to lose the war against the Allied forces. The Armistice of Mudros on the 30th of October 1918 brought an end to the fighting. In early November 1918, the leaders of the Committee of Union and Progress fled the country for fear of Allied retaliation. Senior figures of the party sought links with the Soviet Union for a potential uprising against the Allied occupation in Turkey, especially Cemal and Enver Pashas. Cemal Pasha would eventually be killed in a suspicious assassination in Tbilisi, Georgian Soviet Socialist Republic. Enver Pasha had an even more unusual trajectory. He went to Germany, met with prominent socialists and communists there including Carl Radek, and went to Moscow to discuss potential Soviet support for resistance. He planned to come back to Turkey with a sort of new Committee of Union and Progress (but with communist icing on top, as it were) and lead the Turkish War of Independence. The success of Mustafa Kemal’s resistance movement against the Greeks in 1921 and problems with other Turkish communists (genuine communists this time!) led to a rift with the Soviet government. He went to Central Asia to join the Basmachi Rebellion of Turkic peoples against the Soviets and died there fighting them in August 1922.
Enver could not enter Turkey with his loyalists was the success of Mustafa Kemal and his supporters. His relationship with communism is perhaps even more confusing than Enver’s. During the War of Independence, he prioritised obtaining material support from the USSR. Furthermore, he enjoyed the support of many Turkish communists who thought the Turkish resistance was a bourgeois movement but nevertheless had to be supported as a national liberation movement against the Western imperialism. Some public addresses by Mustafa Kemal Pasha seem to be examples of an Islamo-communism that was popular in the country in the late 1910s-early 1920s. In a particularly good example (his speech in the Parliament on the 14th of August 1920), he denounced “Western imperialism” and capitalism, against which, he said, the Turks and the Bolsheviks alike were fighting. He claimed that Bolshevism incorporated the most sublime principles of Islam. Now, in the very same speech, he also clarified that the Turks’ respect for nationality and religion clearly separated them from the communists. Indeed, considering how various communist groups were persecuted in Turkey in 1923 (and also later on) we have every reason to believe that he thought of communism as a threat. The USSR and the communism abroad was a potential ally, but no such thing would be allowed in the country.
But there were communists themselves who did not regard communism as acceptable merely for pragmatic reasons. In October 1920, Mustafa Kemal and his supporters established the Turkish Communist Party with the hope of securing Soviet help and preventing communists from organising away from Ankara’s sight. The CUP supporters had tried to do much the same thing earlier. They failed as communist and socialist parties proliferated in the early 1920s, and the party would be closed within months. Communists themselves organised a variety of parties, newspapers, and journals. The ones active in Istanbul, for instance, The Socialist Party of Turkey, organised strikes against the pro-Allied government of Damat Ferid Pasha. Elsewhere, the future chairman of the Communist Party of Turkey, Sefik Hüsnü led another socialist/communist party. The most important attempt was probably by Mustafa Suphi, who, with his friends, founded the Communist Party of Turkey in September 1920 in Baku, Azerbaijan. He had joined the Congress of the Eastern Peoples there. The socialist and communist movements did not enjoy a substantial and prolonged growth of influence. Huseyin Hilmi of the Socialist Party of Turkey was shot dead in Istanbul in 1922. Mustafa Suphi was, very suspiciously, drown off the coast of Trabzon in 1920. He had been trying to grow his influence in the Resistance movement and many had a reason to stop him. Mustafa Kemal did not want a Communist group independently operating and Enver also did not like the fact that a young ex-journalist posed a threat to his plan to obtain the support of the USSR and international community of Communists. Ethem the Circassian, who led a group of militias called the Green Army that favoured a form of Islamo-communism, was eliminated when he refused to incorporate his troops to the now-emerging regular army of Ankara in 1921. Nevertheless, from the WW1 onwards there was always an underground but constant movement of Communism in the Ottoman Empire and then in Turkey. I have not gone into much detail on communist movements since this is presumably not what you are asking, though I can talk more about them in an additional comment if you wish.
In short, the attitude cannot easily be characterised as positive or negative. Both the Ottoman government under the CUP, the Ottoman public in 1917-18, the Turkish resistance movement led by Mustafa Kemal Pasha, and the CUP diaspora saw merits in a Soviet alliance. Naturally, there was also a degree of curiosity concerning Communism in the country, especially after the Revolution. As I said, there were even currents of a mixture of Islam and communism that was popular until the end of the Turkish War of Independence. The mixture now sounds odd but it united the two potent forms of anti-imperialist (therefore anti-Allied) resistance back then. It is nevertheless fair to say that besides from the Communists themselves, not many people (certainly not the leaders in Ankara and prominent Turkish nationalists who were to lead the country) much liked the Communist ideal. Some communists renounced their previous ideas and became Kemalists. Some of these, led by Sevket Sureyya Aydemir, founded the Kadro movement in the 1930s; a staunch anti-Westernist, leftist reinterpretation of Kemalism that had a considerable impact on Turkish intellectual history. Some others remained what they were. Believe it or not, these underground Communists not only published books in the 1930s in Turkey but even had occasion to fight one another (and “the renegades of Kadro”) over ideological matters.
Sources:
Mete Tunçay, Türkiye’de Sol Akımlar I: 1908-1925 3rd edn. (İstanbul: 1978).
Atatürk’ün Söylev ve Demeçleri (Ankara: 2006).
George Harris, The Communists and the Kadro Movement: Shaping Ideology in Atatürk’s Turkey (İstanbul: 2002).
George Harris, The Origins of Communism in Turkey (Stanford, 1967).