MOST of the debate about immigration in America concerns the illegal sort. But legal immigration can be controversial too, even when the migrants in question have either an unusual talent for writing computer code or improbably long legs. The H-1B visa programme is aimed at skilled workers in “speciality occupations”, mostly medicine and information technology (though fashion models can also qualify). Currently the programme is limited to 85,000 visas a year, with 20,000 carved out for those who earn postgraduate degrees from American universities. Most workers must make a minimum of $60,000 a year to qualify. Critics argue that the programme has strayed from its original purpose and is now being abused by firms to replace Americans with cheaper labour. Three bills to curtail H-1Bs have already been introduced to the new Congress. Reports suggest that an executive order may also be in the works.

Demand for the visas far exceeds the 85,000 cap, meaning that the government has to ration them to firms by lottery. Indian outsourcing firms like Tata Consultancy Services (TCS), which provides low-cost back-office services, are now the biggest employers of H-1B workers. Analysing data compiled by Théo Négri of jobsintech.io, The Economist found that between 2012 and 2015 the three biggest Indian outsourcing firms—TCS, Wipro and Infosys—submitted over 150,000 visa applications for positions that paid a median salary of $69,500. In contrast, America’s five biggest tech firms—Apple, Amazon, Facebook, Google and Microsoft—submitted just 31,000 applications, and proposed to pay their workers a median salary of $117,000.

Although it is true that foreign workers at the Indian consultancies receive more visas than higher-skilled workers at better-known firms, a simple solution exists. Congress could raise the number of visas issued. Given that the unemployment rate for college graduates sits at 2.5%, it is fair to say that most native workers displaced by H-1Bs land on their feet. Reducing the number of visas for TCS and its brethren would probably result in them shifting work to India. A better change would be to end the rule whereby H-1B recipients must stay with the company that sponsored them. For within their ranks may lurk the next Elon Musk or Sergey Brin.