It seemed to work, for a time, but as my colleague Griff Witte reported earlier this year, many Syrian refugees still attempt the dangerous crossing. Thousands remain encamped in limbo on the other side of the border in northern Serbia.
In one place, at least, security forces have resorted to a new tactic: putting up makeshift scarecrows.
The photos, tweeted by Hungarian journalist Szabolcs Panyi, were uploaded onto the Facebook page of a group that supports Hungary's police and troops, especially those patrolling the border. In a note to WorldViews, Panyi suggested that the pictures were probably taken by security personnel themselves, because ordinary Hungarians aren't normally allowed in the vicinity of the boundary fences.