While attacking his political rivals in California on Wednesday, Attorney General Jeff Sessions made a bizarre comparison that left some questioning the former senator from Alabama’s recollection of American history.

He was speaking before law enforcement officials at the California Peace Officers Association’s annual gathering, a day after suing California over sanctuary city laws that he said violated the Constitution, obstructed immigration enforcement and put officers in danger.

According to previous reporting by The Washington Post, after acknowledging the “wide variety of political opinions out there on immigration,” Sessions then compared the issue to secession during the Civil War.

“There is no nullification. There is no secession. Federal law is the supreme law of the land. I would invite any doubters to go to Gettysburg or to the tombstones of John C. Calhoun and Abraham Lincoln. This matter has been settled,” he said.

The comparison was not well-received and left many scratching their heads, in part for not actually being analogous.

Princeton University history professor Kevin Kruse reminded Americans that California has no interest in leaving America.

“California isn’t trying to leave the Union. It’s resisting federal demands that the state play a role in seizing and expelling undocumented migrants who have made their way there,” he tweeted. “So secession isn’t an apt historical comparison. The Fugitive Slave Act is.”

California Gov. Jerry Brown (D) attacked Sessions’s speech as a “political stunt” by a Trump aide not in good standing with the president. The liberal politician dismissed the conservative Southerner as “a fellow coming from Alabama talking to us about secession and protecting human and civil rights.”

It’s not totally clear what Sessions was implying when he accused California of wanting to take an action that would be the equivalent of the Confederacy seceding. And emails to the Justice Department seeking clarification were not answered. But some of his critics interpreted his words as comparing liberal lawmakers unwilling to help the federal government deport undocumented immigrants to those Americans fighting to keep blacks enslaved, feeding concerns that the Trump administration is led by people with a poor sense of the history of race in America.

As attorney general, Sessions oversees the Justice Department’s Civil Rights Division and enforces federal civil rights legislation despite many lawmakers questioning his commitment. He allegedly accused the National Association for the Advancement of Colored People and other civil rights organizations of being un-American when dealing with civil rights issues. And former colleagues testified that he used the n-word and joked about the Ku Klux Klan, saying he thought the terrorist organization was “okay, until he learned that they smoked marijuana.”

And more than 30 years ago, Coretta Scott King, the widow of civil rights icon Martin Luther King Jr., hoped to block Sessions from a judgeship in a letter to Congress: “Mr. Sessions has used the awesome powers of his office in a shabby attempt to intimidate and frighten elderly black voters.”

But a broader concern about Sessions’s comments is that they show how little Americans actually know about the Civil War. A report released last month by the Southern Poverty Law Center stated that only 8 percent of high school seniors can identify slavery as the central cause of the Civil War.

Widespread ignorance — and disagreement — about the Civil War, even beyond high school students, allows for easy misinterpretation of comparisons involving those who tried to secede from the United States.

Apparently, Sessions does not have the support of Oakland Mayor Libby Schaaf (D), whom Trump called a “disgrace” after she warned undocumented immigrants of impending Immigration and Customs Enforcement raids last month. But making statements reminding Americans of one of the harshest moments in U.S. racial history only sets up Sessions’s critics to remind Americans that the country’s top law official has a controversial past when it comes to race.

As Sen. Kamala D. Harris (D), the state’s first black senator, told MSNBC's Chris Hayes in response to Sessions's comments: “Listen, as far as I’m concerned, Jeff Sessions should be advised — and I’ll advise him right now — that it’s a bad idea, for him, to start talking about anything to do with the history of slavery or Reconstruction or the Civil War in the United States.... His credibility is pretty much shot on those issues.”