The choice Angela Merkel had when Turkey’s imperious president, Recep Tayyip Erdogan, demanded that Germany prosecute a comedian was a variation on the dilemma posed by a kidnapper: Paying the ransom solves the immediate problem but sets a dangerous precedent.

Chancellor Merkel had to decide between appeasing Mr. Erdogan’s outrageous demand or potentially losing a deal with Turkey that promised some relief from the refugee crisis. Under the agreement between the European Union and Turkey, Ankara has agreed to accept refugees turned back from Greece in exchange for more aid and reopening talks on Turkey’s accession to the E.U.

Ms. Merkel allowed the case to proceed. Now the question is what Mr. Erdogan — or some other miffed potentate — will demand next.

Ms. Merkel can argue that she chose the lesser of two political evils, that the ceaseless flood of refugees was undermining the European Union and that all she did was to clear the way for German courts to determine whether to prosecute the satirist, Jan Böhmermann, under an archaic law against insulting foreign leaders. Mr. Böhmermann, a comedian and host of a late-night talk show, deliberately did just that on March 31 when he broadcast a poem that had Mr. Erdogan committing sex with animals and “kicking Kurds and beating up Christians while watching child porn.”