A controversial issue in the US is how to reduce the number of illegal immigrants and what effect this would have on the US economy. To answer this question we set up a two-country model with search in labor markets and featuring legal and illegal immigrants among the low skilled. We calibrate it to the US and Mexican economies during the 2000–2010 period. As immigrants – especially illegal ones – have a worse outside option than natives, their wages are lower. Hence, their presence reduces the labor cost of employers who, as a consequence, create more jobs per unemployed when there are more immigrants. Because of such effects our model shows increasing deportation rates and tightening border control weakens low-skilled labor markets, increasing unemployment of native low-skilled workers. Legalization, instead, decreases the unemployment rate of low-skilled natives and increases income per native.