Formed in 2012 from part of the UK Border Agency (UKBA) which itself was formed in 2008 by a merger of the Border and Immigration Agency, UK visas and the Detection functions of HM Revenue and Customs, formerly HM Customs and Excise.