LONDON — The prime minister of the Netherlands, aiming to head off an insurgent challenge from right-wing populists, stunned many Dutch citizens this week with a strategy that could have come from President Trump’s playbook.

In an open letter, published online and in full-page newspaper advertisements, the prime minister, Mark Rutte, warned of “something wrong with our country” and said “the silent majority” would no longer tolerate immigrants who come and “abuse our freedom.”

Mr. Rutte castigated “antisocial” behavior like littering and spitting, then broadened his critique to include people who do not respect women or gay rights.

While the letter did not explicitly mention Islam, the implication was not lost on anyone, whether or not they support Mr. Rutte, who has been prime minister since 2010 and is seeking a third term in an election set for March. Muslims make up about 6 percent of the population, and there have been sharp debates in the Netherlands for nearly two decades about the role of Muslim immigrants in political and social life.