"The police is the biggest gang out there." This view of the police, or variations of it, emerged frequently in 270 interviews of people who took part in August's riots across cities in England.

Of those participants questioned for the Reading the Riots study, a Guardian/London School of Economics project, 85% said policing was an "important" or "very important" factor in why the riots happened.

Again and again, rioters from different parts of the country described the police as a "gang", claiming its officers enforced a law they themselves played fast and loose with. Complaints included claims of being beaten up in police vans and "stitched up" over offences people were innocent of, but more often related to stop and search and the basic incivility police were accused of displaying in everyday interactions with communities.

The worst street disturbances in decades were, according to many of the people who caused them, "anti-police" riots. Researchers were aware that wider anti-state sentiments might crystallise around negative comments about the police, but in many cases interviewees had specific stories, some dating back to their childhoods, in which they claimed to have been treated unjustly.

One 17-year-old Muslim, who was in full-time work in Tottenham, north London, and took part in the riots, told researchers of an episode when he was stopped by police on his way to school when he was 13: "One of them said to the other one: 'Mate, why don't you ask him where Saddam [Hussein] is. He might be able to help out.' They're supposed to be law enforcement. I hate the police. I don't hate the policing system, I hate the police on the street. I hate them from the bottom of my heart."

Another rioter, aged 34 and also from north London, described an incident when he was aged 12, claiming he was thrown into a police van, handcuffed, beaten, kicked, spat on and called "nigger" and "black bastard". In later life he said he had never "gotten over [his anger] with the police", compounded, he claimed, by three instances in which attempts were made to fabricate charges against him, including one involving a knife.

"These are the type of things that if you ask some people on the other side of the fence or from a posher community or people that have never been in trouble, if you said to them: 'Oh, I got stitched up by police with a knife,' they are saying: 'No, police don't do things like that.' Well, believe me, that is what happened."

One reason for hostility towards the police could be that two-thirds of those interviewed said they had been cautioned by police or convicted of an offence in the past. The riots provided a long-sought opportunity for settling scores; rioters spoke of "payback".

But whether or not the rioters interviewed had been in trouble in the past or not, what many had in common was that they felt the police treated them like criminals regardless of what they had done.

"Young people in general cannot walk down the street without the police stopping them," said a 27-year-old woman from Salford. "[They say]: 'Take your hat off, take your hood off, what you doing, empty your pockets, there's four of you, you've got to split up, you can't go round in a group – even when they are not doing anything wrong."

The Reading the Riots interviews, comprising 1.3m words of first-person accounts from people who took part in disturbances in London, Birmingham, Liverpool, Nottingham, Manchester and Salford, are full of references to the police.

"They just generally class you as someone that's bad like that," one interviewee said. "It really irritates me because I'm not like that kinda bad person, it's just that I get frustrated at police people thinking they can just talk to you like you're some, any other hoodlum, and know you're stupid … and talk to you like you're a five-year-old and you don't know what you're doing, but I'm the police, so you have to listen to me."

A 20-year-old student from east London said: "It's how we get treated. Really and truly... How we get treated is fucked. So, people just had enough. If you keep getting poked, you're gonna go mad. You're gonna blow up."Although the Metropolitan police's interim report into the riots conceded "a level of tension existed among sections of the community" it also noted that this had gone largely unnoticed – having not previously been identified through the force's community engagement process.

Asked "Do the police in your area do a good or bad job?", only 7% of Reading the Riots respondents said "excellent" or "good" – compared with 56% of respondents to the same question in the British Crime Survey.

The project asked 270 rioters to say which of a list of possible causes of the riots they regarded as significant. These same factors were also put to 1,001 adults across the UK by ICM, the Guardian's pollsters. Rioters cited poverty and policing as the two most important causes of the riots, with 86% and 85% of respondents respectively saying the causes were "important" or "very important". The ICM survey of the general population, by contrast, cited poor parenting (86%) and criminality (86%) as the leading riot causes.

Many participants in the disturbances also spoke about the fatal shooting of Mark Duggan in Tottenham, north London, by police, which sparked the riots days later after his family went to a police station asking to speak to a senior officer and were kept waiting. One 21-year-old student who had rioted in central London said: "Police are a gang … They can pull out shanks [knives] or guns and start shooting … They shot Mark Duggan; they're a gang. Look what they done and they think it's OK. That's what a gang is."

The precise circumstances of Duggan's death are not known and are the subject of an investigation by the police watchdog the Independent Police Complaints Commission.

But the shooting often struck a chord with people involved in the riots, irrespective of their race or the city they lived in. One 33-year-old man in Liverpool, who spoke about how he took part in smashing up a police station during the disturbances, said: "I've got friends that have been abused in police custody before … I can't relate to being a black killed, because I'm a white man still alive, but I could relate to injustice within the police force."

Race was never far from the surface of the first-person accounts of rioters. The most acute sense of a longstanding mistrust was among black interviewees.

Many referred to specific incidences of black people dying in custody or during police raids. Though the IPCC said recently that there was no evidence to pursue criminal charges, some blamed police for the deaths of the reggae singer Smiley Culture, who died when officers raided his home; others Roger Sylvester, who died while being restrained outside his home in north London.

One 25-year-old student, who works part-time to fund his studies and who was involved in the Tottenham riot, said: "When we grew up in Tottenham, we'd always hear, 'You've got to be cautious about the police.' I was born … the year before Cynthia Jarrett was killed in Tottenham so I heard from my family, 'You gotta be wary of the police.' So when you got that memory back in there, from that time we heard stories about Roger Sylvester, that kind of kicked off a lot of friction, and then you had Mark Duggan. It's like: 'All right. Wow.' It's like a slap in the face."

Antipathy towards police within black communities appeared to transcend generations. One young black man in Liverpool spoke of how participating in the riots was an expression of his identity: "Grown-ups … the elders of the community … were making it known that they didn't like the police so … that made me personally feel more like yeah, I was representing them."Nowhere were frustrations with police tactics more apparent that when rioters spoke about stop and search. Of the Reading the Riots interviewees, 73% said they had been stopped and searched in the past 12 months – they were more than eight times more likely than the general population in London to have been stopped and searched in the previous year.

The riots panel set up by the government to take evidence from victims and communities identified tensions over stop and search as a possible "motivation factor" in the riots for black and Asian men. It called on the police to improve the way stop and search is conducted. "Where young law-abiding people are repeatedly targeted there is a very real danger that stop and search will have a corrosive effect on their relationship with the police," it said.

The Reading the Riots research indicates that a significant factor in sparking the disturbances was the humiliation, unjust suspicion, lack of respect and targeting that characterises the way rioters felt police carry out stop and search.

One 32-year-old black man from south London said police "stop you for nothing" and "violate" his personal space. "Because you might live on that estate or you might hang round that estate … OK, I fit the description. What's the description? Young black male … I just come out of my yard and I'm chilling for you to come and stop me and search me up. And violate me. Because that's what it is, a violation, talking to me like I'm nothing."

Another 18-year-old black man in Birmingham said he had even changed what he wore – tracksuits – to try to prevent police stopping him. "If you're of ethnicity, you'll get stopped. 'Where you going? What you got pushing?' But yeah … same group, white person, they won't."

That black people are targeted by the police using stop and search was supported by white rioters researchers spoke to. One 22-year-old white female university student, who rioted in London, said: "All my friends are black. It's always black boys that are getting stopped and searched. All the time. I don't know any white boys. I know a couple of white boys and I think they do get away with a bit more. And I feel like young black people are punished a bit more. Like, I'm not just saying it to make excuses for them, I do. That's genuinely what I've seen happen."

The complaint of a harassment by those interviewees on the receiving end of stop of search was made in every city the research took place in and by interviewees from different racial groups and ages.

Rioters recounted how they sought revenge against police. Many adopted the language of war when recalling the brutal confrontation they sought with the police in streets across England. One 29-year-old in London recalled rioting with "a battalion, a squadron, a whole section of men. A troop of men".

Others described how they threw stones and bottles, rammed police with wheelie bins and shouted: "Fuck the police." Some spoke of how they targeted police property, setting fire to and vandalising cars, vans and police stations, or deliberately tried to inflict injury on officers.

What appears to have been the result of this outpouring of anti-police attitudes was, for some at least, a five-day catharsis. Many spoke of being ", of being empowered liberated" and paradoxically, while the streets burned, of being euphoric. Repeatedly, the rioters said their confrontations with police made them feel "powerful".

"We had [the police] under control," said one 21-year-old London rioter. "We had them under manners for once. They never had us under manners. We had them on lock. On smash. Running away from us. We weren't running from the police. They was the criminals today. We was enforcing the law. Getting them out of our town because they ain't doing nothing good anyway for no one."

Responding to the findings, the Association of Chief Police Officers said: "The disorder seen in August was unprecedented in its scale of violence and the way in which events escalated rapidly. It took people by surprise, not enough police officers were available initially and it eventually required 16,000 of them to restore order. Of course the way in which those events took place and were seen by others through the media had an impact on confidence in the police, and it is important that lessons are learned from all the different processes and reports investigating what happened. In a survey of 270 rioters, it would be quite odd if a high proportion did not cite the police as a factor in their behaviour. But August also showed the ability of our police to restore order using robust, common sense policing in the British way."