When a student at Spring Valley High School, South Carolina captured a cellphone video of a police officer flipping over a student and her desk, then throwing the student across the room, the video quickly got national attention: people were alarmed that a police officer in a school would do that to a teenager who didn't pose a threat.

But to others, it was less surprising that a police officer would behave so aggressively in a school: because school discipline and the criminal justice system have already been intertwined, in a phenomenon civil-rights advocates call the "school-to-prison pipeline." Especially for older students, trouble at school can lead to their first contact with the criminal justice system. And in many cases, schools themselves are the ones pushing students into the juvenile justice system — often by having students arrested at school by School Resource Officers like the one in Spring Valley.

Juvenile crime rates are plummeting, and the juvenile incarceration rate dropped 41 percent between 1995 and 2010. But school discipline policies are moving in the opposite direction: out-of-school suspensions have increased about 10 percent since 2000. They have more than doubled since the 1970s. And it's hardly racially balanced: Black students are three times more likely to be suspended or expelled than white students, according to the Education Department's Office for Civil Rights, and research in Texas found students who have been suspended are more likely to be held back a grade and drop out of school entirely.

Here's how the current state of school discipline developed and why some districts and federal officials are working to change the status quo.

1) Concerns about crime led schools to adopt 'zero tolerance' policies

In the 1970s, keeping students out of school as a punishment was relatively rare: fewer than 4 percent of students were suspended in 1973, according to an analysis of Education Department data by the Southern Poverty Law Center. But growing concern about crime and violence in schools led states and districts to adopt policies that required students to be suspended.

The Gun-Free Schools Act, passed in 1994, mandated a yearlong out-of-school suspension for any student caught bringing a weapon to school. And as states began adopting these zero-tolerance policies, the number of suspensions and expulsions increased. The suspension rate for all students has nearly doubled since the 1970s, and has increased even more for black and Hispanic students.

Zero-tolerance policies have been widely criticized when schools have interpreted "weapon" very broadly, expelling students for making guns with their fingers or chewing a Pop-Tart into a gun shape or bringing a camping fork for Cub Scouts to class.

But they're not the only reason schools suspended students more frequently. At the same time as zero-tolerance policies for violence were growing, school districts adopted their own version of the broken windows theory of policing. The broken windows theory emphasizes the importance of cracking down on small offenses in order to make residents feel safer and discourage more serious crimes; in schools, it translated into more suspensions for offenses that previously hadn't warranted them — talking back to teachers, skipping class, or being otherwise disobedient or disruptive.

At the same time, administrators started relying more heavily on actual police — in the form of School Resource Officers (SROs) stationed in schools. From 1997 to 2007, the number of SROs increased by nearly a third. Ostensibly, they were there to prevent mass school shootings like the one at Columbine High School in Colorado in 1998 — in other words, to protect students, not to police them.

But as often happens with law enforcement, resources that are supposed to be used for a rare occurrence often get used for more common occurrences simply because they're there. About 92,000 students were arrested in school during the 2011-2012 school year, according to US Department of Education statistics. And most of those are low-level violations: 74 percent of arrests in New York City public schools in 2012, according to a report published by the state courts, were for misdemeanors or civil violations.

2) Schools have outsourced discipline to juvenile courts and officers in schools

When a school allows a School Resource Officer to arrest a student — or, less drastically and more commonly, refers a student to law enforcement or juvenile court as a form of discipline — they're turning that student over to the juvenile justice system. That makes it that much easier for a student to get a juvenile record (so even if punishment for a first offense is light, punishment for a second offense is likely to be much harsher).

This happens way more at schools with officers. A report by the Justice Policy Institute found that, even controlling for a school district's poverty level, schools with officers had five times as many arrests for "disorderly conduct" as schools without them.

This isn't something that the juvenile court system is calling for — quite the opposite. The chief judge of the juvenile court in Clayton County, Georgia has become an outspoken opponent of police in schools and the school-to-prison pipeline after placing cops on school grounds resulted in eleven times as many students getting sent to juvenile court. He told Congress at a 2012 hearing that "the prosecutor’s attention was taken from the more difficult evidentiary and 'scary' cases—burglary, robberies, car thefts, aggravated assaults with weapons — to prosecuting kids that are not 'scary,' but made an adult mad."

The Department of Education only started collecting detailed data on arrests and referrals for the last two iterations of its Office for Civil Rights report. So it's hard to be confident about trends. But there's some evidence that arrests and referrals are on the decline; referrals to law enforcement of students without disabilities, for example, went down about 9 percent between 2009-10 and 2011-12.

3) Black students are more likely to be disciplined

Black students are suspended or expelled three times more frequently than white students. And while black children made up 16 percent of all enrolled children in 2011-12, according to federal data, they accounted for 31 percent of all in-school arrests.

The disparity begins in preschool: 48 percent of preschool children suspended more than once are black. And students with disabilities are also suspended more frequently than students without disabilities. This, too, can have a racial component. One 2014 study by a Columbia University researcher found that five-year-old boys whose fathers had been incarcerated were substantially less behaviorally "ready" for school than five-year-olds whose fathers hadn't been incarcerated - making them more likely to be placed in special-education classes for their behavioral disabilities.

Several studies have looked at the relationship between race, behavior, and suspension, and none have them have proven that black students misbehave at higher rates. A study in 2002 found that white students were more likely to be disciplined for provable, documentable offenses — smoking, vandalism, and obscene language — while black students were more likely to be disciplined for more subjective reasons, such as disrespect.

Schools with more black students tend to have higher rates of suspension, researchers have found. There's a 2010 study by researchers at Villanova University that showed the punitiveness of a school's discipline policy was positively correlated with the percentage of its students that were black. It wasn't correlated with students' rates of juvenile delinquency or drug use.

A landmark study of Texas discipline policies found that 97 percent of school suspensions were the choice of school administrators. Only 3 percent of students had broken rules that made suspension a required punishment, such as carrying a weapon to school. And those discretionary suspensions fell particularly hard on black students: they were 31 percent more likely to receive a discretionary suspension, even after controlling for 83 other variables.

Many discretionary suspensions and arrests are for tough-to-define offenses, like "insubordination" or "willful defiance," which can just mean a student has challenged the authority of a teacher or school administrator. In California, for example, 40 percent of all suspensions during the 2010-11 school year were for "willful defiance" — which a US Department of Education official defined in 2012 as "any behavior that disrupts a classroom." "Insubordination" was the most common cause of suspension in New York City public schools in 2013-14.

Unsurprisingly, there's a racial disparity in suspensions for nebulous offenses like these: in 2006-2007 (the last year data appears to be readily available) in New York City, 51 percent of students suspended for "profanity" were black, and 57 percent of students suspended for "insubordination." Even arrests by SROs are often for vague reasons: in New York in 2012, one of every six arrests in schools was for "resisting arrest" or "obstructing governmental administration" after the student had been in a conflict with an officer.

4) Even when schools aren't deliberately sending children into the juvenile justice system, disciplining them makes it more likely they'll end up there

Students who are suspended are more likely to repeat a grade or drop out than students who were not. The Texas study, considered the most thorough analysis of school discipline policies and their effects, looked at data from every seventh-grader in the state in 2000, 2001, and 2002, then tracked their academic and disciplinary records for six years. They found that 31 percent of students who were suspended or expelled repeated a grade, compared with only 5 percent of students who weren't.

It's hard to prove causation; it's possible that students who misbehave would have ended up in academic trouble no matter how they were punished. But the Texas study found that students who had been suspended or expelled were twice as likely to drop out compared to students with similar characteristics at similar schools who had not been suspended.

Students who are disciplined by schools are also more likely to end up in the juvenile justice system. The Texas study found that, of students disciplined in middle or high school, 23 percent of them ended up in contact with a juvenile probation officer. That figure stands at 2 percent among those not disciplined. And students who have been suspended or expelled are three times more likely to come into contact with the juvenile probation system the following year than one who wasn't.

It's hard to prove that suspensions cause delinquency in the same way they cause poor educational outcomes. But researchers argue that just as out-of-school suspensions or expulsions don't do anything to improve a student's academic standing, they don't do anything to monitor his behavior or improve his safety, either.

5) The Education Department is pushing schools to change their discipline policies

The Obama administration has opened investigations into the civil rights implications of schools' discipline policies, and urged schools to restructure their discipline systems so that expulsion and suspension are a last resort.

But this effort, by the Education Department and the Department of Justice, has been controversial because the guidance is based on "disparate impact." Even if a policy doesn't mention race and is applied equally to students of all races, the federal government says schools shouldn't use it if the consequences fall disproportionately on students of a particular race. For example, if a school had a policy that all students who were caught using cell phones in class got an out-of-school suspension, and that school ended up suspending a disproportionate number of Latino students as a result of the policy, the federal government would urge the school to figure out if there was another way to achieve the same goal (a cell phone-free classroom) without removing students from the classroom.

Some conservatives argue that schools will become disorderly if teachers and administrators feel that they aren't able to remove disruptive students from the classroom.

6) Some school districts are taking the matter into their own hands

Even before the Obama administration issued that guidance, though, some school districts were acting on their own. Some of the nation's largest districts are working to punish students in ways that don't involve suspension, trying to reform discipline so that students aren't referred to police, or both.

In Clayton County, Georgia, for example, where referrals from schools were overwhelming juvenile prosecutors, the juvenile courts made an agreement with the police force and the school district, restricting the cases in which police were allowed to arrest students in school or refer them to court. The agreement had a huge impact in schools: the high-school graduation rate increased by 24 percent from 2004 to 2010, beating the national average.

Meanwhile, some large school districts are moving away from zero tolerance policies. Broward County, Florida, one of the largest school districts in the country, decided in 2013 that schools, not police, would deal with students' nonviolent misdemeanors. The Chicago Public Schools are trying to reduce the number of suspensions, softening a policy under which students could be suspended for using a cell phone in school and ending suspensions for children younger than second grade, among other changes. In Los Angeles, children under 13 won't be referred to police for minor offenses, after police issued 552 tickets to preteens during the 2013-14 school year.

New York City schools are taking a more targeted approach. The city recently unveiled proposals to overhaul its school discipline code. If the changes go into effect, school principals will have to get the city Department of Education's permission to suspend any student for "insubordination," or for any suspension of a student in third grade or younger. And it would no longer be possible to give "superintendent's suspensions" (a more serious level of suspension) to students involved in "minor physical altercations."

Other schools are exploring restorative justice programs, which focus on forming relationships between teachers, students, and administrators and giving students an opportunity to resolve problems by talking about them. The Oakland School District has been testing this approach for 10 years and recently decided to expand it districtwide after schools using restorative justice reported that their suspension rates were cut in half.