Updated

Germany's new president on Wednesday urged Turkey not to cut ties with its partners and endanger the country's recent achievements, amid a diplomatic standoff that has severely strained relations between Berlin and Ankara.

In his first speech since taking the largely ceremonial office, Frank-Walter Steinmeier said Germans were watching developments in several countries with concern — "especially in Turkey."

Steinmeier, who until recently was Germany's foreign minister, said Berlin recognized the economic progress Turkey has made in the last 20 years and condemned last year's attempted coup against the government of President Recep Tayyip Erdogan.

But he warned that Turkey's achievements could collapse again. "My appeal is guided by this concern: President Erdogan, you are endangering everything that you and others have helped build," Steinmeier said in his address to a joint session of Parliament.

He also called on Turkey to safeguard press freedom and release German-Turkish journalist Deniz Yucel, who has been detained since January on charges of terrorist propaganda and incitement to hatred.

Turkey has expressed anger at perceived slights from Berlin, including a parliamentary motion referring to the 20th century killing of Armenians as "genocide" and the decision by several German cities to ban events at which Turkish officials wanted to campaign for an upcoming referendum on constitutional reform in Turkey.

Germany, meanwhile, has said Ankara's crackdown on the opposition and civil society following the failed coup goes too far, and has bristled at Turkey's repeated accusation that modern Germany is acting like the Nazis did.

"Credible signals to ease tensions are welcome," said Steinmeier. "But stop the unspeakable Nazi comparisons. Don't cut ties with those who, like us, want a partnership with Turkey."