A security guard fired three warning shots when several dozen migrants tried to enter Hungary Tuesday through a border crossing with Serbia, Hungarian police said.

Police said they were able to stop most of the 60-70 migrants from entering Hungary, while four were caught at the scene and detained.

The border crossing at the southern village of Roszke had been closed for the night when the attempt occurred.

Officials described the incident, which took place at 5:30 a.m. (0430 GMT) at the same location as a September 2015 riot by migrants when Hungary closed its southern border with fences protected by razor wire, as a “flagrant and violent group attempt" to breach the border.

"Three armed security guards were on duty at the border crossing," said Police Lt. Col. Karoly Papp, head of public security at the Interior Ministry, adding that the migrants did not react to warnings by the guards. “Then, one of the armed security guards fired three warning shots into the air. At this time, the entering group stopped, a significant number turned around and ran back to Serbian territory.”

Hungarian authorities have been pointing to a noticeable increase in past months in the number of migrants coming north through the Balkans and trying to enter Hungary. Many rely on human traffickers and are trying to make their way to Western Europe.

The jump in migrants caught by police at the southern border has been mostly growing since late October, from usually less than 300 a day to around 1,000 a day, or more, in recent weeks. It includes those sent back to Serbia through gates in the border fence, those prevented from crossing and those arrested near the border.

Restrictive changes in recent years to Hungary's asylum and immigration laws have made it nearly impossible for asylum-seekers presenting their applications at the Serbian border to win protection in Hungary. In 2018, Hungary approved 367 requests for asylum or similar protection.

Hungarian Prime Minister Viktor Orban is in the middle of his third consecutive term, fourth overall. During the 2018 parliamentary elections, he campaigned nearly exclusively on an anti-immigration platform.