In December 1984, former Pakistani military dictator Zia ul-Haq held a referendum on his controversial and divisive Islamization policies. The Islamist ruler won a landslide victory albeit independent observers noted widespread irregularities in the vote. The referendum extended Haq's presidential term by five years and gave him unlimited powers. Haq had enormous powers even before the referendum, but from 1985 to his death in a plane crash in 1988, the general acted like a "caliph." Pakistan's liberal sections say their country never really recovered after the 1984 referendum.

There can't be accurate comparisons between Turkish politics under President Recep Tayyip Erdogan and the Pakistan of the 1980s, but the victory for the "yes" camp in Turkey's April 16 referendum reminded many South Asians of Pakistan's disastrous experience with authoritarianism and Islamism.

"RIP, Turkey. By the way Turkey, we beat you at this game by 33 years. We did the same under Zia ul-Haq in 1984," Nahyan Mirza, an Islamabad-based development professional, wrote on Facebook.

Other social media users in Pakistan also pointed to the similarities.

Pakistanis can definitely share a thing or two with the Turkish people about how mixing politics and religion can be fatal for a nation. Apart from the uncanny similarities between Haq and Erdogan, a protracted war in the neighboring country, the role of the West in defeating a "common enemy," and the training of numerous militias to topple a foreign government are only some other parallels between Pakistan and Turkey, which otherwise have very different historical and geopolitical outlooks.

The rise of Islamic extremism in Turkey as a result of the Syrian conflict, and the way President Erdogan is using the war to silence dissent against his authoritarian rule and crush Kurdish separatists are some of the factors that are likely to shape Turkey's future.

Pakistan underwent a similar transformation in the 1980s and is still struggling to come out of it.

Turkey is facing a surge in violent extremism

The Afghan war of the 1980s changed the political landscape of Pakistan forever. Like Ankara, Islamabad decided to become a party to the war at the behest of the West to achieve its own strategic goals - to expand its area of operation in Afghanistan to counter the Indian influence.

Also, like Erdogan, former Pakistani dictator Zia ul-Haq promoted a hard-line Islamic ideology in his country and cracked down on liberal political groups and activists. He expected the West to turn a blind eye to grave human rights violations in Pakistan, as he believed he was doing a favor to the US by fighting its proxy war in Afghanistan.

In an article published by news site Al-Monitor, prominent Turkish journalist Fehim Tastekin warned his countrymen against a possible "Pakistanization" of Turkey. He argued that "the armed uprising in Syria, with the goal of changing the regime, has given birth to organizations that are threatening the entire population of the region, but Turkey is continuing on its way in total disregard for the perils of 'Pakistanization.'"

Tastekin quotes Mushahid Hussein, the chairman of the Pakistani Senate's Defense Committee, as warning former Turkish Prime Minister Ahmet Davutoglu - when the ex-premier visited Islamabad - against the "Pakistanization" of his country.

"You are repeating in Syria the mistakes we made in Afghanistan. Organizations you support now will turn against you. Pakistan was wrong in becoming party to the war in Afghanistan and was wrong in supporting the Taliban. We are now paying the costs of these mistakes," Hussein was quoted as saying in the article.

Training of militants

Michael Kugelman, a South Asia expert at the Woodrow Wilson Center for Scholars, believes it is risky to compare Turkey and Pakistan as they are different in many ways, but there are some striking convergences as well: "The main one is the overall volatile dynamic - a strongman-type government presiding over an environment of growing instability and terrorist threats. There is also a level of deepening Islamization in Turkey today that bears uncanny resemblances to what happened in Pakistan in the 80s."

Turkish President Erdogan has good relations with Pakistani PM Nawaz Sharif and his brother Shahbaz (left)

The renowned expert says that Ankara is treading a very dangerous path by training and arming the rebels in Syria and Iraq.

"Whenever a state actor develops a relationship with armed non-state actors, you risk major blowback. That is the case no matter what the context - Pakistan, Turkey, and even, quite frankly, the US in Afghanistan and Iraq. You never know what these non-state actors will do to you - they may want state support today, but that doesn't mean they won't turn on you tomorrow," Kugelman told DW.

Rise of Islamism

According to Arif Jamal, a US-based expert on Islamic extremism, the Islamist resurgence in Turkey is not a new phenomenon; it started two decades ago.

Many experts associate the rise of Islamism in Pakistan with the 1980s war in Afghanistan but Jamal is one of the analysts who trace back its origins in the early 1950s.

"But that is where the parallels and similarities end. Turkey has been a geographical entity for centuries and does not feel psychologically insecure. Pakistan, on the other hand, has no history. It was created in the name of Islam and it has struggled to survive by trying not to be what India is," Jamal told DW. Meanwhile, the Turkish state and society still remain largely secular, he added.

The jihadists that Islamabad nurtured during the 80s have turned against the state

Kugelman, however, believes that might change in Turkey: "If Saudi-sourced sects of Islam are starting to compete with Sufi Islam in Turkey, then we could be seeing history repeating itself - a cause of a Saudi-imported version of Islam eclipsing a more moderate form of Islam, just like it happened in Pakistan. The question is how much influence and reach Saudi-sourced schools of Islam could enjoy in Turkey. We don't yet know how this will all play out in Turkey."

But Turkish journalist Fehim Tastekin has no doubts that his country is "now seeing the beginnings of a tragic Deobendi-esque transition from Sufism to radicalism," and that he is "not surprised to hear of hundreds of Turkish citizens joining IS and Jabhat al-Nusra" jihadist groups.

A tight grip on power

Critics accuse President Erdogan of authoritarianism and say he is tightening his grip on power, more so after the April 16 referendum. The government is cracking down on dissidents, secular and Kurdish activists and journalists, and has introduced controversial terror laws that the rights groups deem as draconian. Despite domestic opposition to his policies, the president continues on the path using the Syrian war as a bargaining chip.

"Erdogan has used wars in Iraq and Syria to not only crush political dissent against his government and the Kurdish nationalists but also to further his Islamist agenda," analyst Arif Jamal said.

Tastekin believes the ambitions of Zia ul-Haq and Erdogan are similar - the former "dreamed of expanding Pakistan's sphere of influence first to Afghanistan and then to Asia, and Turkey's President Erdogan wanted to pray in Damascus' Emeviye Mosque and become caliph there," he underlined.