Attorney General Jeff Sessions resigned on Wednesday at the request of Donald Trump. He served a little less than two years as the head of the Department of Justice. During that time, Sessions used his immense power to make America a crueler, more brutal place. He was one of the most sadistic and unscrupulous attorneys general in American history.

At the Department of Justice, Sessions enforced the law in a manner that harmed racial minorities, immigrants, and LGBTQ people. He rolled back Obama-era drug sentencing reforms in an effort to keep nonviolent offenders locked away for longer. He reversed a policy that limited the DOJ’s use of private prisons. He undermined consent decrees with law enforcement agencies that had a history of misconduct and killed a program that helped local agencies bring their policing in line with constitutional requirements. And he lobbied against bipartisan sentencing reform, falsely claiming that such legislation would benefit “a highly dangerous cohort of criminals.”

Sessions’ attack on immigrants was equally ruthless. He compelled immigration judges to order the deportation of more unauthorized immigrants and punished them when they did not. He barred most victims of domestic violence from seeking asylum in the United States, deporting survivors back to their persecutors. He attempted to rescind the Deferred Action for Childhood Arrivals program, subjecting hundreds of thousands of young immigrants to deportation but was too inept to do so lawfully. He tried to prevent states and cities from protecting immigrants within their borders. And he implemented the “zero tolerance” family separation policy, imprisoning thousands of individuals at the border for the misdemeanor of unlawful entry, then seizing their children and locking them in cages. (Hundreds of these kids are still separated from their parents.)

Meanwhile, Sessions mobilized the DOJ’s attorneys to torture immigrant minors in other ways. He fought in court to keep undocumented teenagers pregnant against their will, defending the Trump administration’s decision to block their access to abortion. His Justice Department made the astonishing claim that the federal government could decide that forced birth was in the “best interest” of children. It also revealed these minors’ pregnancies to family members who threatened to abuse them. And when the American Civil Liberties Union defeated this position in court, his DOJ launched a failed legal assault on individual ACLU lawyers for daring to defend their clients.

As he oversaw family separation, forced birth, and mass incarceration, Sessions found time to degrade LGBTQ Americans and their families. He issued a memo alleging that federal civil rights laws do not protect transgender employees, a position the Justice Department recently reiterated to the Supreme Court. He also argued that these civil rights laws do not protect gay people. His DOJ defended Trump’s ban on open transgender military service by claiming that trans people are disordered deviants. Under his leadership, the DOJ also asked the Supreme Court to rule that many businesses have a First Amendment right to turn away same-sex couples. (Sessions gave a speech to the anti-LGBTQ group that brought that case to SCOTUS, thanking them for their “important work” on behalf of religious liberty.)

The guiding principle of Sessions’ career is animus toward people who are unlike him. While serving in the Senate, he voted against the reauthorization of the Violence Against Women Act because it expressly protected LGBTQ women. He opposed immigration reform, including relief for young people brought to America by their parents as children. He voted against the repeal of Don’t Ask, Don’t Tell. He voted against a federal hate crime bill protecting gay people. Before that, as Alabama attorney general, he tried to prevent LGBTQ students from meeting at a public university. But as U.S. attorney general, he positioned himself as an impassioned defender of campus free speech.

While Sessions doesn’t identify as a white nationalist, his agenda as attorney general abetted the cause of white nationalism. His policies were designed to make the country more white by keeping out Hispanics and locking up blacks. His tenure will remain a permanent stain on the Department of Justice. Thousands of people were brutalized by his bigotry, and our country will not soon recover from the malice he unleashed.

His successor could be even worse.