In 2015, Hungary built a border barrier on its border with Serbia and Croatia. The fence was constructed during the European migrant crisis, with the aim to ensure border security by preventing illegal immigrants from entering, and enabling the option to enter through official checkpoints and claim asylum in Hungary in accordance with international and European law.