BERLIN — Some trips are better avoided.

Turkish President Recep Tayyip Erdoğan’s state visit to Germany was meant to mark a new beginning in a relationship that has been strained by mutual distrust over everything from Ankara’s human rights record to Germany’s treatment of its Turkish minority.

So far, his three-day German jaunt, which began Thursday and ends late Saturday, has offered a powerful reminder of just how deep the divide between Germany and Turkey remains. By the end of his first full day in Berlin, Erdoğan had ditched his nice guy act and was back in attack mode. Angela Merkel, meanwhile, found herself struggling to defend her government against accusations it is aiding and abetting Erdoğan’s efforts to thwart press freedom.

Turkey’s detention of several German citizens on what Berlin considers political grounds amid Erdoğan’s broader authoritarian turn in recent years cast a long shadow over the visit, sparking calls for a boycott by many public figures. Critics warned Erdoğan would use the trip as a propaganda tool to highlight his influence on the world stage and divert attention from the economic crisis his policies have triggered at home.

Merkel opted to host the Turkish leader anyway, arguing that the visit could pave the way for a normalization of ties.

While it was clear from the outset that Erdoğan’s trip would be fraught with diplomatic pitfalls, few predicted the public relations fiasco that played out during his first 24 hours in the German capital.

Upon arrival at his hotel next to the Brandenburg Gate, Erdoğan greeted supporters with a four-finger wave many associate with an Islamist gesture. The mass circulation Bild tabloid splashed a picture of the scene across its front page under the headline: “Erdoğan taunts Germany with Islamic salute.”

It was all downhill from there.

At Bellevue Castle, the seat of Germany’s presidency in central Berlin, Erdoğan received full military honors during his official welcome Friday morning. But President Frank-Walter Steinmeier and his wife looked anything but welcoming, standing stony-faced next to Erdoğan and Turkey’s first lady for the official photo. Steinmeier's office described the meeting between the two that followed as “serious and concentrated.”

Erdoğan’s next stop was the chancellery, where Merkel greeted him with a broad grin. The good cheer didn’t last long.

In her opening remarks at a joint press conference that followed their meeting, Merkel sought to accentuate the positive, while acknowledging the challenges in the relationship with Ankara.

“We have a lot that binds us,” she said, citing the cultural ties between the two countries that have grown through Germany’s Turkish population. She also noted the “deep differences” between the two countries over the rule of law and the arrest of German citizens, while expressing hope the problems could be resolved.

But the focus of the brief press conference quickly shifted to Turkey’s treatment of critical journalists, many of whom have been imprisoned, and whether Germany is helping Erdoğan intimidate reporters during his visit to Germany.

Journalists covering the press conference were subjected to a security regimen that a reporter for German public radio later in the day described as “scandalous.” A reporter for AFP complained that during a security check a Turkish official harangued him, asking what kind of questions he intended to ask Erdoğan during the press conference.

Then, in the middle of the press conference, security personnel manhandled and escorted a Turkish journalist living in Germany out of the packed room for wearing a T-shirt emblazoned with a call for “freedom of the press in Turkey.”

Merkel’s spokesman later defended the expulsion on Twitter, saying that the chancellery didn’t allow political “demonstrations” at news conferences. He didn’t explain why the government considered supporting press freedom, a universal value in democratic societies anchored in Germany's constitution, to be political.

The incident transpired just as Erdoğan was in the midst of a lengthy monologue about why Turkey detained journalists and others it deems enemies of the state. He chuckled at the interruption and then he and Merkel resumed the press conference.

Earlier, it emerged that Erdoğan had threatened to cancel his participation altogether if Can Dündar, a prominent Turkish newspaper editor living in exile in Berlin, took part. Erdoğan accuses Dündar of being an “agent” who stole state secrets and wants Germany to extradite him. In order to prevent Erdoğan from canceling, Dündar, who denies the accusations, agreed not to attend.

“The most important reason why I decided not to participate in the press conference was that it became clear to me that Erdoğan would use my presence as an excuse not to show up and subject himself to the critical questions of German colleagues,” Dündar said at his own press conference later in the day.

Asked about the circumstances surrounding Dündar’s decision, Merkel stressed that it was the journalist’s own call not to come.

“In principle, anyone can ask a question,” she insisted.

In the end, it was Merkel who shielded Erdoğan from the toughest questions by wrapping up the press conference before the Turkish leader could answer a reporter’s query about whether he had apologized to the chancellor for accusing her government of “Nazi practices” last year.

Enough is enough

The high point of Erdoğan’s Berlin visit came late Friday with a state dinner at Bellevue hosted by Steinmeier.

Just before the dinner, thousands of protesters took part in a march they called “Erdoğan Not Welcome” through central Berlin. More than 3,000 police were on hand in Berlin’s central district to maintain order.

More than half of the roughly 300 people invited to the state dinner declined, including Merkel. Her office noted that she rarely attends such affairs.

Among those who did attend was Cem Özdemir, a prominent Green politician of Turkish descent. In the receiving line, he told Erdoğan in Turkish that he regretted the president’s decision to abandon his democratic values, according to German press reports. Erdoğan stared back in silence.

By dinnertime, Erdoğan had had enough.

After Steinmeier again raised the issue of press freedom and the plight of journalists in Turkey in his dinner speech, Erdoğan went on the offensive. He ditched his manuscript and accused Germany of harboring “terrorists,” referring specifically to members of the separatist Kurdish Workers Party, or PKK, some of whom had participated in the demonstration earlier in the day. He then turned his ire to Dündar, the exiled Turkish editor, whom he said the Germans carried around “on a silver tray.”

Perhaps sensing that the evening hadn’t gone as planned, Erdoğan ended his remarks on a more conciliatory note.

“The love between Turks and Germans is so old that it will never be broken,” he said.

Erdoğan's next chance to display that love comes at a meeting with Merkel Saturday morning. He's then scheduled to travel to Cologne to open a mosque before returning home.