This paper analyses the impact of immigration on the welfare of the native population in an economy that consists of skilled and unskilled workers. Due to unionisation, the wage rate in the market for unskilled labour is above the competitive level. For a given skill endowment of the native population, we show that immigration reduces the welfare of the host country up to a certain threshold and then increases it with further immigration. For the case of endogenous skill formation, an increase in expected immigration raises the number of skilled individuals in the native population. If the government can credibly commit itself to a certain immigration policy, skill formation of the native population will adjust, so that immigration maybe strictly welfare increasing.