In recent months, Spain has become a front line of migration to Europe, after the closing of Hungary’s border to Serbia and Austria’s crackdown on migrant arrivals, which have led fewer people to try to illegally enter Europe via the Mediterranean shores of Greece and Italy.

Over 26,500 asylum-seekers entered Spain in the first eight months of this year, according to the International Organization for Migration — more than in all of 2017.

Under current practice, the European Union country where migrants first arrive is responsible for registering them and determining whether they are refugees. But that system was established before the war in Syria and the rise of the Islamic State, which drove hundreds of thousands of people to seek refuge.

Countries on the Continent’s perimeter have complained that the practice forces them to carry a disproportionate burden, requiring them to process and care for migrants who in some cases already have relatives in the wealthier countries of northern Europe.

At the summit meeting in June, European leaders agreed to a set of proposals to handle migration, including setting up centers in Europe and North Africa where recently arriving migrants would be screened, identified and distributed among the member states. So far, no countries outside the bloc have been eager to allow it to set up centers on their territory.

In an effort to better handle refugees, Germany opened its first screening centers last week in Bavaria, the home state of Mr. Seehofer, where his party faces a tough local election in October.

The centers are to function as clearing houses where migrants would live until the authorities are able to process their applications for refugee status. Previously, new arrivals were distributed among communities throughout the country, and were put in temporary accommodation while their status was decided.

Critics have argued that the centers would separate the migrants from the broader German society, making it more difficult for them to adjust. And the German branch of the charity Save the Children has accused the centers of failing to offer “an environment that children need in order to grow.”