The free movement of persons is one of the fundamental principles guaranteed by the European Union. Any EU resident has the right to travel, live, study, work, set up a company or provide services in another Member State without being subject to nationality-based discrimination. The counterpart of the free movement of persons is an external border policy which governs the entry and stay of non-Europeans in the EU. As defined in the Schengen Border Code rules governing the movement of persons and goods across external borders aim to prevent security threats inside Europe. Consequently the need for effective border control, including prevention of illegal immigration is reflected in the European immigration policy and border control measures. These border control measures however, are often criticized as abuse of the fundamental rights of migrants such as freedom of movement and right to international protections.