"Now the border is generally under control. It was broken [crossed illegally] by refugees in two places at night. We have detained 17 people, they will be prosecuted," the representative told RIA Novosti.
All refugees are directed to a checkpoint, where they must formally register. After the procedure is over, they travel by buses to Budapest.
Hungary is one of several EU countries reeling from the rapidly escalating migrant crisis, as hundreds of thousands of people flee their homelands in the Middle East, North and Sub-Saharan Africa in the hope of finding refuge in the European Union.
During the weekend, almost 6,000 refugees were detained while attempting to cross the border illegally. On Monday alone, 9,380 migrants, the daily record, were intercepted at the Hungarian border.
However, the number of illegal border crossings into Hungary has gone down considerably in the 12 hours since tighter border control laws took effect, government spokesman Zoltan Kovacs announced.
"The first results are as follows: the flow of refugees has decreased markedly, because we have strengthened the border, set up a wall and an army there," Kovacs said at a briefing in the southeastern city of Szeged.
More than 190,000 migrants have crossed the Hungarian border illegally this year, according to the country's interior ministry.