People protest the detention of German journalist Deniz Yucel in front of the Turkish Embassy in Berlin on Feb. 28. Yucel, 43, was detained Feb. 18 and his apartment searched in connection with news reports on an attack by hackers on the email account of Turkey's energy minister. (John MacDougall/AFP/Getty Images)

The arrest of a German journalist in Turkey on terrorism-related charges sparked demonstrations in Germany on Tuesday and a growing diplomatic rift between the two NATO allies, as Germany’s Foreign Ministry summoned the Turkish ambassador in protest.

The journalist, Deniz Yucel, a Turkey correspondent for the ­daily Die Welt newspaper, was formally charged Monday after being detained for about two weeks, according to his attorney, Veysel Ok. The accusations related to several articles by Yucel and included charges of “spreading propaganda of a terrorist organization and for inciting the public to hatred” — a reference to the Kurdistan Workers’ Party, or PKK, which is considered a terrorist group by Turkey, according to a summary of the case by P24, a Turkish civil society group that tracks press freedoms. 

The charges were part of a sweeping crackdown by the ­government of President Recep Tayyip Erdogan after an attempted coup in July that has led to the arrests of tens of thousands of people, including journalists, and the shuttering of media outlets. Yucel, a dual citizen of Turkey and Germany, was the 155th journalist to be imprisoned in Turkey, according to records compiled by P24.

His case has attracted attention in part because Turkish authorities have rarely prosecuted correspondents working for foreign media outlets. It has also highlighted Turkey’s increasingly strained relationship with the German government, which has emerged as one of the more persistent critics of the Turkish crackdown. At the same time, German Chancellor Angela Merkel has sought to balance the criticism with the need to preserve cordial relations because of a deal between Turkey and the European Union that limits the number of Syrian refugees leaving Turkey for Europe.

In a statement Monday, Merkel called the arrest “bitter and disappointing” and “disproportionately tough.” 

“The German government expects the Turkish judiciary to take into account the high value of press freedom for each democratic society when dealing with Yucel’s case,” the statement said. 

Foreign Minister Sigmar Gabriel released a statement Monday that was less restrained, calling the arrest “inappropriate” and saying it came during “difficult times for German-Turkish relations.” 

The case, he added, “shines a bright spotlight onto the differences our two countries have when it comes to the implementation of fundamental principles of the rule of law and valuing press freedom and freedom of speech.” On Tuesday, he said the Foreign Ministry had summoned Turkey’s ambassador to discuss the case.

Turkish officials have cast the arrests as necessary security measures as the government’s war with Kurdish militants intensifies and as Turkey faces a growing number of deadly attacks by extremists belonging to the Islamic State militant group. Human rights groups say the security campaign has moved far beyond legitimate threats and swept up the government’s political opponents while penalizing free speech. 

There were signs this week that the arrest of Yucel was considered a step too far, even by some government loyalists. Mustafa Yeneroglu, a parliament member from Istanbul with the ruling Justice and Development Party, called Yucel an “activist” in a Twitter post but said the arrest was “very problematic.” 

 “The concept of propaganda is being stretched,” he wrote. 

Fahim reported from Istanbul.