Police in Macedonia used stun grenades and tear gas Friday to drive back thousands of migrants and refugees trying to cross its southern border from Greece. The confrontations took place just one day after the Macedonian government in Skopje declared a temporary state of emergency at the border with Greece and the northern border with Serbia, multiple media reports said.

The government in Skopje is trying to exert greater control over the nation's borders as mainly Syrian and Afghan civilians try to reach countries inside the European Union, where they can travel freely from country to country and apply for asylum. While Greece is already in the EU, its continuing economic crisis and high number of refugees coming into the country from Africa and the Middle East to escape war and poverty have overwhelmed its already meager refugee facilities and made gaining asylum there almost impossible.

"It is a fact that we are facing an increased pressure from the influx of migrants attempting to cross the border,” Ivo Kotevski, a spokesman for the Macedonian Ministry of Internal Affairs, told the New York Times. “But so far we have the situation under control, and there haven’t been any major incidents or injuries.”

Some of the people arriving are migrants, seeking a better life. Others are refugees, fleeing war zones, violence or oppressive economic conditions.

Security at Macedonia’s border with Greece has been stepped up in recent days after it was estimated that as many as 3,000 migrants had congregated with intentions of crossing over. “Within the last 24 hours, a total of 181 migrants have passed the border,” Kotevski said, “which is around 10 times less than in the previous day.”

As part of the Schengen Zone, an area made up of 26 European countries not requiring travel documents or imposing border control, people inside Greece regardless of nationality or status would ordinarily be allowed to travel to any other Schengen country, which includes most of Western Europe. However, Greece has no border with any other country inside the free travel zone, making it difficult for migrants at the border to make it across. Migrants and refugees would ordinarily be able to fly without any restrictions, but most are unable to pay for the expensive flights.

Macedonia is not a part of the EU or the Schengen Zone, but it is often one of the first stops for migrants and refugees trying to reach Western Europe. Once inside Macedonia, migrants will likely try to cross into Serbia and then Hungary, the nearest country inside the Schengen Zone and part of the EU.

After arriving in Hungary, those seeking asylum can freely cross into Western Europe. If history is any indication, most will attempt to make it to Germany or the Scandinavian nations, where asylum facilities and welfare for refugees have been generous. However, those at the border in Greece are in a race against time as Hungary was planning to shut its border by erecting an “anti-migrant fence.”

The United Nations Refugee Agency has criticized closing the border crossing, saying the refugees are in need of protection and “must not be stopped” from crossing, a statement said.