Thousands took to the streets after Friday night's failed military coup — not only in Turkey, but also in Germany. In the western German city of Essen, 5,000 people held a spontaneous rally in support of the government, as 2,000 assembled in Berlin.

The protesters followed President Recep Tayyip Erdogan's call urging Turks to take to the streets, saying "this is not just a 12-hour operation."

As the Turkish government began a punishing campaign against suspected coup plotters, there were increasing signs that the tensions in Turkey were now also playing out in Germany. Thomas Oppermann, a leader of Germany's Social Democratic Party, harshly criticized Erdogan on Sunday. "When thousands of judges and prosecutors are removed who had obviously nothing to do with the coup, then that is an attack on democracy," Oppermann said.

But many of Germany's roughly 3 million Turkish immigrants were likely to be enraged by Oppermann's statement. On social media, some users who appeared to be Turkish immigrants living in Germany voiced discontent. "He is a third-rate person who is good for nothing," one user named Hakan Gündüz wrote in response to Oppermann's comments. Another commentator argued that the comments were a sign that Germany's coalition government "used every chance to get rid of fundamental rights."

"The inner-Turkish tensions between nationalists and Kurds, as well as between Erdogan-supporters and opponents must not play out in Germany," Social Democratic politician Aydan Özoguz, who is the governmental commissioner for integration, told a German newspaper Monday, reflecting fears that protests could eventually turn violent.

The head of Germany's Turkish community said he was critical of the mass arrests in Turkey following the coup attempt, but he also expressed support for Erdogan. "Thank God democracy has won," Gökay Sofuoglu was quoted as saying by local newspaper Kölner Stadt-Anzeiger.

More Turks live in Germany than anywhere else outside Turkey. Germany started to invite Turkish citizens to work in the country in the 1960s as it was facing a severe labor shortage, and many Turks subsequently moved to Germany as temporary "guest workers." Contrary to initial governmental plans, a significant share of those workers never left the country.

Despite living in Germany, many Turkish immigrants are still allowed to vote in their country of origin, and about half of all Turkish immigrants have retained their citizenship. When Turkey's presidential election was held in 2014, the government rented a soccer stadium in Berlin where 140,000 Turks cast their votes.

Conservative German politicians have claimed that the political influence of the Turkish population in Germany has contributed to the emergence of "parallel societies." In the run-up to the presidential election in 2014, Erdogan visited Germany to campaign, with tens of thousands of people rallying for him.

German politicians responded with skepticism and anger. "Erdogan carries the Turkish conflicts to Germany," Christian Democratic politician Wolfgang Bosbach said ahead of Erdogan's visit at that time.

In his visit, Erdogan harshly attacked his critics. "How can a prime minister still be called as a dictator after all the democratic reforms?" he asked the crowd, responding to criticism that he was increasingly governing the country in an authoritarian way.

Erdogan's comments came at a sensitive time: For years, German Chancellor Angela Merkel has urged immigrants to assimilate better into German society. Erdogan, however, has urged Turkish immigrants living in Germany not to follow Merkel's advice. "Integration yes, assimilation no," he told a crowd during an election campaign event in 2014. According to Erdogan, Turkish immigrants should speak German, for instance, but should not give up their understanding of politics and their cultural habits.

Amid those previous clashes between Erdogan and Merkel, there is a feeling among many of them that the German government does not fully represent their interests. "The Turkish government has tried to fill this gap, with Erdogan posing as the patron of the Turkish diaspora," Germany's Der Spiegel magazine argued in 2014.

That conflict could start to expand in the coming days, as Erdogan considers introducing the death penalty for those accused of plotting the failed coup. On Monday, Merkel's spokesman said that E.U. membership talks with Turkey would end should the country pursue plans to execute the suspects.

With many Germans critical of Erdogan's punishing campaign, and thousands of immigrant pro-Erdogan protesters willing to take to the streets, there is a growing fear that Turkey's conflict will increasingly play out in Germany.

Read more: