Hungary made plans on Wednesday to reinforce its southern border with helicopters, mounted police and dogs, and was also considering using the army to confront a record number of migrants trekking into Europe, many fleeing Syria.

Police said a record 2,533 migrants — most of them from Syria, Afghanistan and Pakistan — were caught entering Hungary from Serbia on Tuesday. Another 1,300 were detained on Wednesday.

Hungary, which is part of Europe’s Schengen passport-free travel zone, is building a fence along its 175-km border with Serbia in a bid to keep them out, taking a hard line on what right-wing Prime Minister Viktor Orban says is a threat to European security, prosperity and identity. Authorities said over 140,000 migrants had entered Hungary from Serbia to far this year.