ISTANBUL — Ebru Umar, a Dutch journalist, wrote a column last week critical of Turkey’s president, Recep Tayyip Erdogan, and his government’s growing crackdown on freedom of expression. She later took to Twitter, criticizing supporters of Mr. Erdogan and using a profanity.

On Saturday night, the police arrived at her summer home in Turkey and took her in for questioning for insulting Mr. Erdogan, a crime in Turkey. Ms. Umar was released from custody on Sunday, she said on Twitter, but was barred from leaving the country.

She is the latest on a growing list of journalists, academics, cartoonists and others — nearly 2,000 cases have been filed in Turkish courts — who have faced the Turkish justice system for insulting Mr. Erdogan. The crime carries a sentence of four years in prison. Ms. Umar was detained just as European leaders, including Angela Merkel, the German chancellor, and Donald Tusk, the president of the European Council, were wrapping up a visit to Turkey to highlight progress in its pact with the European Union over the migrant crisis.

Turkey’s clampdown on the news media has increasingly become intertwined with Europe’s attempts to cooperate with Turkey on the migrant issue. European leaders, especially Ms. Merkel, are facing criticism that they are betraying European values in a bid to win over Mr. Erdogan.