We conduct a field experiment to show that discrimination in the rental market represents a significant obstacle for the geographical assimilation process by immigrants. We employ the Internet platform to identify vacant rental apartments in different areas of the two largest Spanish cities, Madrid and Barcelona. We send emails showing interest in the apartments and signal the applicants' ethnicity by using native and foreign-sounding names. We find that, in line with previous studies, immigrants face a differential treatment when trying to rent an apartment. Our results also indicate that this negative treatment varies considerably with the concentration of immigrants in the area. In neighborhoods with a low presence of immigrants the response rate is 30 percentage points lower for immigrants than for natives, while this differential disappears when the immigration share reaches 50%. We conclude that discriminatory practices in the rental housing market contribute to perpetuate the ethnic spatial segregation observed in large cities.