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.
The account posting the images said that the masks were made in part out of carved sugar beet root and that no migrants had reportedly crossed in the areas where the scarecrows had been put up in the past month.
More on WorldViews