More than 5,000 migrants were allowed by Macedonia to cross into Serbia on Sunday after the former reopened its border with Greece Saturday, giving up its attempts to stem the flow of migrants by force.

On Thursday, Macedonia had declared a state of emergency and shut its border in order to curb the influx of asylum seekers, leading to clashes between the stranded refugees and police officials who resorted to stun grenades, batons and tear gas.

After reopening the border, Macedonia sent buses and trains to carry the migrants north.

Serbian Defense Minister Bratislav Gasic said that the country had taken in all the people, and expected more in the coming days. "We expect the wave in the next day or two to be of a similar intensity," Gasic said, according to Reuters. "Police are working in three shifts, papers are being issued around the clock."

Italy’s Foreign Minister Paolo Gentiloni warned that the deepening migrant crisis could threaten Europe’s “soul.”

"On immigration, Europe is in danger of displaying the worst of itself: selfishness, haphazard decision-making and rows between member states," he said, according to Agence France-Presse.

The migrants are mostly refugees fleeing violence and chaos in Syria, Iraq and other Middle East nations. They cross the Mediterranean to arrive in Greece and then travel north through Serbia to reach Hungary and Europe's borderless Schengen zone.

The European Union has agreed to resettle over 32,000 immigrants over the next two years, dividing them among its member nations. However, several nations have begun revolting against the EU policy, which they call unfair. Last week, a Slovakian official said that the country would only be willing to resettle migrants who were Christians.

United Nations warned earlier this month that 107,500 migrants had entered Europe in July, triple of that reported in the same month last year. The massive influx of migrants has been called the worst since World War II by Europe’s Migration Commissioner Dimitris Avramapoulos.