The contact hypothesis posits that having diverse neighbors may reduce one’s intergroup prejudice. This hypothesis is difficult to test, since individuals self-select into neighborhoods. Using a slum relocation program in India that randomly assigned neighbors, I examine the effects of exposure to other caste neighbors on trust and attitudes towards members of other castes. Combining administrative data on housing assignment with original survey data on attitudes, I find evidence corroborating the contact hypothesis. Exposure to more neighbors of other castes increases inter caste trust, support for inter caste marriage, and the belief that caste injustice is growing. I explore the role of friendships in facilitating these favorable attitudes. The findings shed light on the positive effects of exposure to diverse social groups through close proximity in neighborhoods.