This paper offers an academic examination of the legal regimes surrounding the criminalisation of irregular migrants in the EU and of acts of solidarity with irregular migrants, such as assisting irregular migrants to enter or remain in the EU, and other behaviour that is motivated by humanitarian instincts. The research analyses EU law and its relationship with national provisions regarding the criminalisation of irregular migration and of acts of solidarity vis-á-vis irregular migrants. A comparative analysis was made of the laws of the UK, France and Italy, supplemented by an analysis of the laws of Germany, the Netherlands and Spain. By considering the role of public trust in fostering compliance with the law, the paper explores the impact of criminalisation measures on institutions’ authority to compel individuals to comply with the law (institutional legitimacy). The study finds that certain indicators question institutional legitimacy and reveals the varied nature and extent of penalties imposed by different member states. The paper concludes that there is an important role for public trust in immigration law compliance, not just in measures directed towards irregular migrants but also towards those acting in solidarity with irregular migrants.