Recent influential empirical work has emphasized the negative impact immigrants have on the wages of U.S.-born workers, arguing that immigration harms less educated American workers in particular and all U.S.-born workers in general. Because U.S. and foreign born workers belong to different skill groups that are imperfectly substitutable, one needs to articulate a production function that aggregates different types of labor (and accounts for complementarity and substitution effects) in order to calculate the various effects of immigrant labor on U.S.-born labor. We introduce such a production function, making the crucial assumption that U.S. and foreign-born workers with similar education and experience levels may nevertheless be imperfectly substitutable, and allowing for endogenous capital accumulation. This function successfully accounts for the negative impact of the relative skill levels of immigrants on the relative wages of U.S. workers. However, contrary to the findings of previous literature, overall immigration generates a large positive effect on the average wages of U.S.-born workers. We show evidence of this positive effect by estimating the impact of immigration on both average wages and housing values across U.S. metropolitan areas (1970-2000). We also reproduce this positive effect by simulating the behavior of average wages and housing prices in an open city-economy, with optimizing U.S.-born agents who respond to an inflow of foreign-born workers of the size and composition comparable to the immigration of the 1990s.