Attorney General Jeff Sessions might need to brush up on his US history.

During a speech last week on California’s sanctuary laws, he did something unexpected: He compared California to Southern states that seceded from the Union before the US Civil War.

The attorney general was in California to launch a lawsuit against the state’s “sanctuary” laws, which limit how local law enforcement and employers assist Immigration and Customs Enforcement (ICE) in arresting and detaining immigrants.

The federal government argues that California’s sanctuary laws interfere with federal policy and violate the supremacy clause of the Constitution.

Sessions’s speech was supposed to outline the US government’s case against California. But his remarks, which the Washington Post called “unusually strident,” focused heavily on the power of the federal government and federal law.

Sessions also seemed to link California’s unwillingness to cooperate with federal immigration authorities to the secession of Southern states and the creation of the Confederacy. “There is no nullification. There is no secession. Federal law is the supreme law of the land,” he said. “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.”

His remarks invoking the Civil War “left some questioning the former senator from Alabama’s recollection of American history,” the Washington Post’s Eugene Scott wrote on Thursday. Historians like Kevin Kruse of Princeton University and Judith Giesberg of Villanova responded to Sessions’s comments, saying any mention of secession was inaccurate and noting that California has more in common with abolitionists who sought to shield runaway slaves.

Furthermore, as Scott notes, Sessions is opening himself up to criticisms of his troubled record on race and civil rights by referencing the Civil War. His comments also speak to a larger issue within the Trump administration: It repeatedly gets history — especially history related to race in the US — wrong.

Sessions isn’t the first Trump official to get Civil War history wrong

Last spring, while discussing the Civil War during an interview, President Trump said that former President Andrew Jackson would have prevented the conflict. “I mean, had Andrew Jackson been a little bit later you wouldn’t have had the Civil War. He was a very tough person, but he had a big heart,” Trump said.

When critics pointed out that the Civil War started some 16 years after Jackson’s death in 1845, Trump doubled down on the comments, saying that Jackson “saw it coming.”

While it’s true that Jackson helped defuse tensions between the federal government and South Carolina over a disagreement about tariffs in the 1930s, he also owned slaves and did not speak out against slavery, a crucial point in any discussion of the Civil War.

President Andrew Jackson, who died 16 years before the Civil War started, saw it coming and was angry. Would never have let it happen! — Donald J. Trump (@realDonaldTrump) May 2, 2017

In the same 2017 interview, Trump also wondered aloud why the war happened at all. “People don’t ask that question, but why was there the Civil War? Why could that one not have been worked out?”

He’s made other comments as well. Shortly after white supremacists gathered in Charlottesville, Virginia, to protest the removal of a monument for Confederate Gen. Robert E. Lee, the president argued against efforts to remove the monuments of Confederate figures like Lee and Stonewall Jackson, saying the removal would be “changing history.”

He added that if the monuments were removed, figures like George Washington and Thomas Jefferson would be next, due to their ownership of slaves.

Other members of the administration have also waded into the issue. During an interview with Fox News’s Laura Ingraham in October, White House Chief of Staff John Kelly said Lee was an “honorable man” and that “the lack of the ability to compromise led to the Civil War.”

Shortly after Kelly’s remarks, the New Yorker’s Jelani Cobb wrote that Kelly’s comments reflected America’s larger problem with discussing the Civil War. He argued that the conflict is largely reduced to an issue of “states’ rights” or framed as part of an inevitable timeline of progress rather than discussing the real harms slavery caused and the deep desire to preserve the institution.

“The more profound issue — one that Kelly’s view of the war completely overlooks — is not how compromise could have prevented war,” Cobb wrote. “It’s that those compromises were part of the reason that black people, who made up more than forty percent of the Southern population in 1860, had existed in slavery or indenture for two hundred and forty-one years in North America.”

Confusion about the Civil War isn’t limited to the Trump administration

All these examples point to a broader issue: that the general public continues to be taught a version of the conflict that never happened.

Kelly’s comments about Lee and compromise, for example, swiftly earned criticism from historians for relying on a “Lost Cause” framing of the conflict, which paints Lee as an honorable man simply fighting for his state, in a war born out of a failure to communicate.

This reading absolves the Confederacy of its desire to preserve slavery and frames the conflict as a hero’s fight for states’ rights and the preservation of heritage. As historian David Blight has noted, “the Lost Cause became a mood, or a disposition toward the past,” where the Confederacy is cast in a more positive light and the slaves they fought to keep were forgotten.

This framing of the Civil War has been around for generations. As Matt Ford wrote in the Atlantic last year, “Trump’s understanding of the Civil War may be out of step with current scholarship, but it’s one that was taught to millions of Americans for decades.”

Textbooks in the 1950s and ’60s — over the objections of black academics and families — referred to the Civil War as a simple state conflict, so it would be easy to attribute Trump and Sessions’s comments to the education they received growing up.

But what’s concerning is that things actually haven’t improved very much. A recent report from the Southern Poverty Law Center found that just 8 percent of high school seniors can identify slavery as the central cause of the Civil War. A history textbook caused controversy in 2015 when a black mother noted that her son was being taught from a book that referred to African slaves as migrant workers.

And when public and governmental officials misunderstand the conflict and the causes behind it, it can have far-reaching effects. Last year, Housing and Urban Development Secretary Ben Carson referred to slaves as “immigrants who came in the bottom of slave ships, who worked even longer, even harder, for less.” Critics jumped on the remarks, arguing that they proved that Carson was ill-equipped to handle a job overseeing anti-discrimination programs.

And when Trump, shortly after saying that there were “very fine people on both sides” of the violence in Charlottesville, made comments that equated a Robert E. Lee monument with one of George Washington, it sent a signal. It indicated that he probably doesn’t understand the importance of current civil rights policies and what they mean for communities of color.

Slavery and the Civil War are not the only aspects of American history that the Trump administration has been confused about. But at a time when tensions around issues of race and civil rights run high, and the president’s agenda has been criticized for being an “affront to civil rights,” the Trump administration really needs to get its history straight.