Turkey and Germany are, nominally, friends.

But if you take even a cursory look at the way the two have been behaving lately, you'd be forgiven for thinking otherwise.

Over the past few months, the two countries have been locked in an increasingly heated war of words and diplomatic slights. It culminated this week with German Foreign Minister Sigmar Gabriel interrupting his North Sea vacation to deliver a strongly worded statement promising to “reorient” the country's Turkey policy. It's not totally clear what that means, but step one is “new travel advisories” discouraging German citizens from visiting Turkey because of “risks.” If followed, this could be a big blow to Turkey's travel industry — 4 million Germans visited the country in 2016, more than from any other country.

“The government and the coalition parties will be discussing further consequences,” Gabriel said, noting that financial sanctions were also being considered. Others have called for a cancellation of the deal between the European Union and Turkey on refugees. According to Der Spiegel, officials are also considering the suspension of German government loan guarantees for exports or investments in Turkey.

That statement came after Turkey arrested six human rights activists, including Peter Steudtner from Berlin. An Istanbul court ordered them into pretrial detention. German consulate officials say that they've been prohibited from speaking with the activist, a violation of international law. Steudtner is an Amnesty International representative, in Turkey for the first time at a conference. He was running a training on IT security and nonviolent conflict resolution when he was arrested.

German Chancellor Angela Merkel has condemned the decision as “absolutely unjustified,” saying “we declare our solidarity with him and all the others arrested. The German government will do all it can, on all levels, to secure his release.”

Eight other Germans are also in jail in Turkey awaiting trial, including a journalist. Experts suggest that the arrests are part of a larger effort to force Berlin to deport Turkish citizens in Germany whom Ankara considers terrorists. Germany houses some 3 million people of Turkish origin, including thousands who've applied for asylum since last year's failed Turkish coup. In the aftermath, tens of thousands of people have been arrested and 100,000 have lost their jobs.

Turkey has accused Steudtner and others of plotting to commit acts of terrorism against the state. In reacting to Gabriel's statement, they suggested that Germany is harboring terrorists of its own. Turkish Foreign Minister Mevlut Cavusoglu wrote on Twitter that, “as a country providing shelter to PKK and FETO terrorists in its own territory, statements by Germany are just double standards and unacceptable.” (PKK stands for the Kurdistan Workers' Party and FETO is the Fethullah Terrorist Organization.)

“What we're seeing in Germany at the moment is a crisis of principals,” said Chairman of the Commission for Foreign Affairs Taha Ozhan, a member of President Recep Tayyip Erdogan's AK party. “The question is whether terrorism is supported or not … the terrorists think, 'Once we get to Germany, we're home safe.' That has to change.”

Through a spokesman, Erdogan “strongly” condemned statements that German citizens who travel to Turkey are not safe.

It's a strange slide from friends to frenemies for the two countries. As Der Spiegel explains, “the joint battle against Islamic State, the handling of the refugee crisis and the economic ties between Germany and Turkey are vital to both countries.” Germany is one of Turkey's most important trading partners. In 2016, the countries' trade volume hit $43 billion. Germany invests $14 billion a year in the country.

A year ago, the pair pushed through an important deal to help stem the influx of refugees from the Middle East to the European Union. In exchange, Turkey was looking to restart E.U. talks and to loosen travel restrictions on Turkish citizens living in the E.U. But both sides say the other hasn't quite lived up to its end of the bargain. In November, the E.U. voted to freeze its membership talks with Ankara.

Other issues have cropped up. In June 2016, German lawmakers voted to recognize the massacre of Armenians by Ottoman Turkish forces during World War I as a genocide. In the buildup to the vote, Erdogan and others warned that it would be a “real test of the friendship.”

By March, Erdogan was accusing Merkel of using “Nazi” methods because the German government did not allow rallies in support of changes to the Turkish constitution. Germans said the problem was the appropriateness of the venues. Several Turkish ministers were also barred from speaking in support of the referendum at rallies. In May, Turkey blocked a delegation of German lawmakers from visiting the country's soldiers at an air base. (Germany is part of a coalition of countries that uses that air base to launch attacks on the Islamic State.)

In the past, Merkel's response to provocation has been circumspect. She's urged her government to focus on the big picture and ignore the slights. With Steudtner's arrest, though, it seems like things will be changing. As Gabriel put it:

“We want Turkey to be a part of the West, or at least remain in its current position, but it takes two to tango. I cannot make out any willingness on the part of the current Turkish government to follow this path with us.”