A police spokesman said police used the teargas to disperse around 200 migrants who had refused to be fingerprinted and trying to leave the processing centre at Roszke near the border with non-EU Serbia, along which Hungary is erecting a fence.
The spokesman, Szabolcs Szenti, said "police are trying to calm the situation, but the migrants are continuing to shout."
An AFP correspondent at the scene said the situation has since calmed down. Another spokesman said the migrants wanted to leave the centre after news circulated that Germany was easing asylum rules for people fleeing the civil war in Syria.
The majority were from Syria, Afghanistan and Pakistan, and included more than 500 children.
"We left because we were scared, we had fear, bombs, war, killing, death... That's why we left Syria," one Syrian man heading for the Hungarian border told AFP yesterday.
"If I go to Europe, I think it's going to be better... better than my life in Syria."
The migrants crossing into Hungary form part of around 7,000 refugees and migrants whose journey to the European Union was blocked last week when Macedonia declared a state of emergency and shut its borders for three days after being overwhelmed by the influx.
A summit of western Balkans leaders plus German Chancellor Angela Merkel set to be dominated by the crisis takes place on Vienna tomorrow.
So far this year, 140,630 migrants have been intercepted crossing into Hungary, the vast majority over from Serbia. The daily number has leaped from 150 in early 2015 to more than 2,000 this month.
