Quietly, and often with similar misgivings, a growing number of people in Hungary and beyond are wondering whether, despite his shrill and often bigoted message, Mr. Orban had a clearer view of the scale of the migration crisis and its potential hazards than technocrats in Brussels and leaders in Berlin and other European capitals.

In fact, Mr. Orban’s prescriptions — notably the need to secure Greece’s porous coastline and seal Europe’s outer borders — have slowly been embraced by other European Union leaders, who vowed on Thursday, at their final summit meeting of 2015, to “regain control” of the Continent’s frontiers.

Speaking in Brussels at the end of the summit meeting on Friday, Mr. Orban said that “it has taken us a long time” but that there was now “an absolute consensus among the prime ministers on the issue of protection and control of the external borders.” With a big grin, he added, “Actually it was Hungary’s point of view since the beginning that we should start here.”

While repelled by much of the hate-mongering that has accompanied Mr. Orban’s positions, European leaders have nonetheless begun to echo him on many points, albeit without his nasty snarls. The shift reveals just how far the debate around migrants and asylum seekers has turned, particularly since revelations that a few of the terrorists who killed 130 people in Paris on Nov. 13 had entered Europe in the tide of refugees.