It has pained U.S. Attorney General Eric Holder to watch how the White House and Justice Department handled Special Prosecutor Robert Mueller’s two-year investigation — particularly U.S. Attorney General William Barr’s actions after the long-awaited report landed.

Holder, attorney general from 2009 to 2015 under President Barack Obama, said Barr’s move to summarily absolve the president before releasing the report, both in his summary to Congress and in a press conference this week, is incongruent with the independence expected of that department.

“He’s making mistakes. The attorney general of the United States is the people’s lawyer, not the president’s lawyer,” said Holder, who keynoted the “Justice Demands” Gala of the James B. Moran Center for Youth Advocacy at Mayne Stage in Rogers Park on Thursday.

“I’m glad I’m not in D.C., given the events of this week,” said Holder, 68, who was a judge, U.S. attorney and deputy U.S. attorney general before becoming the first African American to head the Department of Justice.

“When I was being confirmed, I was made to understand the attorney general of the United States is not the ‘secretary of justice.’ You’re different from any other cabinet member, given all the power you have to deprive people of their liberty, take their property away. You have a responsibility to run the Justice Department in a way that is not political,” Holder said.

“The greatest attorneys general have been the ones who have had that sense of independence, like Elliot Richardson, [President Richard] Nixon’s attorney general and one of my heroes, fired by Nixon for refusing to fire independent special prosecutor Archibald Cox in the wake of Watergate,” he said.

“Those greats reminded me that my responsibility was to the Justice Department, to the people of the United States, and if that puts me in conflict with the president, then I should be ready to give up the job,” Holder said.

The 38-year-old Evanston Moran Center provides social services and legal representation for youth, is dedicated to criminal justice reform, the arena where Holder has been both advocate and trailblazer.

Holder’s Justice Department in 2013 initiated the “Smart on Crime” program, a sweeping initiative renouncing decades of tough-on-crime, anti-drug policies blamed for the disproportionate mass incarceration of people of color.

“Mr. Holder has been a tireless advocate for those who have been dispossessed, disenfranchised, and disempowered, and we hope this tribute will inspire our own community of supporters to continue demanding justice,” said Patrick Keenan-Devlin, executive director of the center, which presented Holder its Justice from the Lighthouse Legacy Award.

The event, in its seventh year, annually draws heavy hitters in social justice; last year it was headlined by U.S Rep. John Lewis, D-Ga., a civil rights legend.

Holder’s pointed comments on the role of the Justice Department came on the heels of the release of the Mueller Report. Before the release, Barr had held a press conference to reiterate the reasoning behind his conclusion that President Donald Trump had not obstructed justice.

The full report, however, detailed many times Trump repeatedly tried to kill the investigation and was thwarted only because his own people would not follow his orders — a glaring example being former White House Counsel Don McGahn’s resignation when Trump pressured McGahn to fire Mueller.

“I’m a career prosecutor. I think that people need to be held accountable for their actions,” Holder said at one point.

The remainder of his speech and comments in a subsequent conversation with three Evanston Township High School teens focused mostly on American racism, and the role racism has played in mass incarceration.

“In a nation as strong and advanced as ours, we should be ashamed of the sorry state of criminal justice in our nation, especially at the state level, and in how we treat our young people,” Holder said.

“We warehouse people and forget them, instead of trying to deal with the deficits that put them into the system in the first place. We need to focus on rehabilitation, prevention, re-entry into the community,” Holder said.

Holder lamented many areas of “progress” under Obama that he said have been wiped out.

“In the years that I was attorney general, criminal justice reform was becoming a bipartisan issue,” he said.

“That is really one of the failings, I think, of this current administration, that bipartisan spirit that was once there, to move the criminal justice system to a better place, has not only been ignored, it has been set back. That’s one of the things that has to change when a Democrat is elected in 2020,” he said to raucous applause.

Holder, whose post-government work has focused not just on criminal justice reform but on gerrymandering reform to fight widening voter suppression nationwide, said in those and other arenas, racism remains America’s Achilles’ heel.

“Look at our economic system, or any of the other ways in which people of color are discriminated against. Why do you expect the criminal justice system to be any different?” Holder asked.

“I think the notion of us ever being post-racial — given our nation’s history — is probably a place we’re never going to get to. The question is: ‘Yes, I see you as an African-American. Yes, I see you as an Hispanic, as an Asian-American. But what do I do with that knowledge?’ ” he said.

“But we’re in a much better place than we were, say, 50 years ago, so I’m optimistic. If I had told my father this nation would one day elect a black president, or that his boy would one day be U.S. attorney general, he wouldn’t have believed it.”