“Nobody could avoid him,” the show boasted in a Twitter post on Monday.

But Mr. Erdogan was not the only one who did not find the whole thing funny. German commentators pointed to the spat as a demonstration of the dangers of making deals with a leader who has shown an increasingly antidemocratic streak even as he has sought broader recognition and favors from the European Union for agreeing to stem the flow of migrants to Europe.

In the video, the German chancellor, Angela Merkel, also comes in for mockery as cozying up to a leader who has been increasingly criticized for flouting the bloc’s democratic ideals.

On Wednesday, the German government did not find much to laugh at in the matter.

Christiane Wirtz, a spokeswoman for Ms. Merkel, confirmed that the German ambassador to Ankara, Martin Erdmann, had been summoned on March 22 over the video, and again on Tuesday for attending the opening of a trial on Friday of two opposition journalists charged with espionage.

The trial was abruptly closed to the public, and Mr. Erdogan criticized the German and other foreign diplomats in the courtroom.