In recent years there has been growing concern that the social legitimacy of west-European welfare states is threatened by immigration. The underlying argument is that immigration yields ethnic, racial, cultural, religious and linguistic diversity, which is said to impact negatively on feelings of similarity and commonality among citizens. This, in turn, is claimed to erode trust and cohesion between people, which ultimately undermines public support for a system of redistribution that is precisely built upon such solidarity. This phenomenon of 'welfare chauvinism', the view that people from minority groups should be excluded from accessing the welfare state, has recently been at the forefront of many political and societal debates. Also academics have devoted much attention to the issue, predominantly comparing countries or analysing trends. Yet the relationship on the lowest analytical level is often overlooked: do people express lower solidarity with welfare claimants from minority groups than with those from majority groups, and if so, on what grounds and under which conditions does this occur? To answer this question I use a novel panel dataset that we gathered among approximately 5000 respondents in Britain and 4000 in the Netherlands. In this thesis I mainly use survey experiments that approach the issue from various angles. I find that in both countries, but especially in Britain, public solidarity with welfare claimants from immigrant (and to a lesser extent also ethnic minority) groups is astonishingly low. A majority of the population stands very negatively to the idea that members of minority groups also have access to pensions, sickness and disability benefits and unemployment schemes. However, other experiments paint a more nuanced picture: claimants' diversity characteristics are dwarfed by the effort they make to find a new job, which is a far more important driver of the perceived deservingness of an unemployed person. I give evidence of a double standard in the evaluation of welfare claimants: in case of 'favourable' behaviour, such as making much effort to look for jobs or having a long work history, minority and majority claimants are not evaluated very differently. In case of 'unfavourable' behaviour however, claimants from minority groups are penalised more severely. I furthermore demonstrate that welfare chauvinism is more widespread among certain subgroups of the population. My thesis shows that the impact of diversity on solidarity is incredibly multi-faceted and complex. Accurate understanding of the matter requires nuance, as well as recognition that the conflict between immigration and the welfare state is not a simple either/or issue, as is often implied in the political arena and the media.