The election of a far-right British National party councillor in the Isle of Dogs in September 1993 still stands as the most graphic justification of what the liberal urban elite has come to hold as an article of faith: that many of the white working-class inhabitants of "cockney" east London are socially regressive and profoundly, irredeemably xenophobic.

That simmering racial tension between the white working class and the large Bangladeshi community in Tower Hamlets has existed for more than 30 years is indisputable. But while conventional liberal opinion has tended to attribute its causes solely to white racism, the truth is far more complex.

The story of racial conflict in the East End is part economic, part political, part historical. But what is most striking is the sense in which it is the direct, if unintended, consequence of well-meaning welfare policy - particularly in the area of social housing allocation.

Our analysis of the public housing battle in Tower Hamlets, and the way in which it crystalised feelings of political betrayal and exclusion in the white community, is in some ways a piece of local research; but the findings inform the debate about social cohesion elsewhere.

For the past 12 years, we have carried out well over 1,000 interviews with people of all races living in Tower Hamlets. Our aim was to uncover the new East End; to find out what had happened to the white, extended Bethnal Green families whose intricate and overlapping networks of relationships and support had been recorded in Michael Young and Peter Wilmott's 1957 book, Family & Kinship in East London.

We knew much had changed. The City of London had arrived in Tower Hamlets in the form of Canary Wharf and other glittering new office blocks. Prosperous professionals had come to inhabit the expensive apartments in the restored warehouses lining the Thames, and there was now a large and youthful Bangladeshi community, amounting to more than a third of the borough's population in 2001.

We were not surprised to discover that the extended family support found in Bangladeshi families was very like that found in the white Bethnal Green families of the 1950s. They shared many of the same vulnerabilities: very low incomes, job insecurity, ill health.

What was especially remarkable was the level of resentment our white interviewees had towards these families, who seemed to have so much in common with the families of the past. All ethnic groups we spoke to revealed at least some hostility to others. But of the white respondents, a majority expressed a sometimes bitterly negative attitude towards foreign immigrants, particularly Bangladeshis.

There was hostility to real and imagined Bangladeshi customs and personal habits, alleged insularity or un-neighbourly behaviour. But by far the largest number of complaints arose in relation to Bangladeshi claims on the welfare state, their rights and entitlements. Many of these complaints were implausible or involved serious ignorance of how welfare procedures operated; but others were based on a real sense of injustice over the way the allocation of social housing appeared to be slanted preferentially to Bangladeshi needs.

By the early 80s, white and Bangladeshi communities had opposed interests over housing. Both groups felt badly treated. The housing shortage was exacerbated by a right-to-buy policy without a replacement building programme. Bangladeshi families were overcrowded, and many felt that the promises made under the official allocation system were not honoured.

Whites, meanwhile, felt that the system of prioritising housing allocation - once predicated on a waiting list that gave weight to applicants with local and community connections but which now privileged the most "needy" - unduly favoured Bangladeshi families.

Certainly, the sovereign principle of housing allocation from the 70s onwards - that vacancies in public housing should be allocated to those in greatest need - carries moral force. But in a place with such pressure on housing, it also had the effect of breaking up long-established East End family and community links.

One interviewee, Mavis Browning, told us that when she tried to get a flat locally for her daughter, to avoid her having to leave the area, she was advised by officials that the best thing to do would be to turn her out and make her homeless. "The community isn't as close as it used to be," she reflected. "It has broken down. Our children have to move out because there are no flats for them."

Her comments were echoed by others, who found council actions hostile to family life. "I would lay part of the blame for family break-up on council housing," said one respondent. "Children used to live with the parents even after they got married. Now that is not accepted. The parents get left in inner London, while the children have to go out to Essex, and vote Tory."

It is significant that, of all our interviewees, it was typically the granny, the East End "mum" with a busy extended family revolving around her, who turned out to be most hostile to Bangladeshis. It made sense insofar as it is "mum's" life that is diminished if her offspring have moved, or will be forced to move, out of the area.

Anti-racist card

The system has tended to treat with scorn Bethnal Greeners' "irrational" attachment to their locality. Arguably, there has been an "anti-racist card" played against the white working class. The response of planners to white anxieties around housing has been to dismiss the idea of locality, and to expect people to exercise their housing entitlements elsewhere if necessary. When local white residents have objected, their assertions of local commitment have been made to look unreasonable by the suggestion that what they are objecting to really is that the Bangladeshis competing with them are not white.

The hostility of white working-class Bethnal Greeners to Bangladeshis is fundamentally tied up with local history, particularly that of the second world war and its impact on the expectations of the white community. This came up time after time in our interviews. The East End dockers, with the sacrifices they made in the bombing raids of the Blitz, were seen as national saviours. From where they were standing, the benefits of the welfare state were a reward for their effort during the war - a reward they had earned for themselves and their ilk, rather than been given as yet more Victorian-era "charity".

It is, therefore, the family elders above all who remember with bitterness those promises about rebuilding the East End for future generations to enjoy. It may be the memory of broken pledges that moulds the shape of contemporary hostility more than personal pathologies.

While white subjects often accused Bangladeshis of playing the welfare system, there was also a widespread feeling that the system itself, rather than the players, was mainly at fault; that the system was biased towards meeting Bangladeshi needs and that they could leapfrog whites to the front of the queue.

There was also a more general dismay at the way that British society appears to be changing. The evolution of the welfare state had turned it from a mutual aid society writ large into a complex, centralised and bureaucratic system, run by middle-class do-gooders, "those big-hearted ones who've got their own big houses and make these rules", as one interviewee put it. The system, it was felt, gave generously to those who put nothing into the pot, while making ordinary working people who did contribute feel like recipients of charity when drawing their entitlements.

Interestingly, few respondents saw the immigrants themselves as being at fault. Few whites, for example, deny that Bangladeshi families endure greater real poverty than themselves. A number who strongly resented the present welfare system were nevertheless friendly with Bangladeshi neighbours. What they object to is the way this need is allowed to over-ride rights and claims arising out of an earlier, more directly exchange-based welfare state ethic. Respondents hostile to immigrants were no less condemning of white people who they considered to be living off the system.

For if what one gets out of the state is determined solely by need, rather than what one has put into it, then a little dignity has been taken out of citizenship. Dependency is encouraged, the principle of reciprocity has gone, and welfare has simply become a new form of charity.

Such a decline of the old working class is no triumph for the Bangladeshis. They are aware that it has not made their lives easier, not least because of the hostility to which they are consequently exposed. As the long-term underdogs in day-to-day life, the system has tended to support Bangladeshi interests in local conflicts over resources, but such backing cannot be relied upon in the long term. The British welfare system is sympathetic to new and needy groups. But as the groups settle in, and some of their members become incorporated into the ruling class, the solicitude of the elite is liable to move on to more vulnerable groups.

Political instability

This augurs badly for political stability. Preoccupation with the most vulnerable means that parts of all incoming groups, along with the downgraded members of the national majority, will feel that their length of residence in the country does not seem to give them a durable stake in it.

This represents a threat to social democracy. The alienation of parts of the white working class from local and national government that is evident in the East End could happen in urban Britain more generally.

The government has rightly declared a commitment to promoting social cohesion. But some of this has meant that by, understandably, attacking racism more vigorously, there is a failure to carry some parts of the white community with them, thus perpetuating the cycle of resentment. People like our white interviewees have a perception that nothing is being done for them and plenty - too much, even - is being done for others.

This amounts to the unanticipated consequence of well-intentioned welfare policy. So, for example, supporting equal opportunities schemes to address racial discrimination and helping newcomers to access their rights is not enough on its own. It must go hand in hand with addressing the exclusion, poverty and hostility faced by poor white communities.

· Geoff Dench is a professor of sociology at Middlesex University and a fellow at the Young Foundation. Kate Gavron is a fellow at the Young Foundation and a vice-chair of the Runnymede Trust. This article is adapted from the authors' book, The New East End - Kinship, Race and Conflict, co-authored with the late Lord (Michael) Young, and published next week by Profile Books, RRP £15.99. To order a copy for £14 with free UK p&p go to theguardian.com/bookshop or call 0870 836 0875.