In March, President Trump visited the Hermitage, a former slave plantation in Tennessee once owned by Andrew Jackson, to pay homage to his 19th century predecessor. For Trump and his then-chief strategist Steve Bannon, the parallels were irresistible: An agrarian populist from the Tennessee frontier, Jackson was the first to cast himself as the common man’s warrior against corrupt Washington elites and moneyed political interests.

But even more revealing than their similarities was how Trump viewed his predecessor's place in American history. In an interview a month after the trip, he alleged that Jackson, who died in 1845, could have prevented the Civil War:

I mean, had Andrew Jackson been a little later you wouldn’t have had the Civil War. He was a very tough person, but he had a big heart. He was really angry that he saw what was happening with regard to the Civil War. He said, “There’s no reason for this.” People don’t realize, you know, the Civil War, if you think about it, why? People don’t ask that question, but why was there a Civil War? Why could that one not have been worked out?

Historians today broadly agree that a slaveholding aristocracy was irreconcilable with the nation’s founding pledges of liberty and equality, and that decades of compromises between top American statesmen only delayed an inevitable confrontation. But the president’s view that the conflict could’ve been “worked out” would’ve fit at home in another place: the history classes of his youth.

Until the late 1960s, history curricula in Trump’s home state of New York largely adhered to a narrow vision of American history, especially when discussing slavery, the Civil War, and its aftermath. This was true in the predominately white public schools throughout the country. The African American experience and its broader significance received little to no attention. When textbooks did cover black Americans, their portrayals were often based on racist tropes or otherwise negative stereotypes. 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.

“The dominant story was that secession was a mistake, but so was Reconstruction,” Jonathan Zimmerman, a New York University professor who studies the history of American education, told me. “And Reconstruction was a mistake because [the North] put ‘childlike’ and ‘bestial’ blacks in charge of the South, and the only thing that saved white womanhood was the Ku Klux Klan. When African Americans read this in their textbooks, they obviously bristled.”

Thanks to his family’s wealth, Trump did not attend public school in Queens, where he grew up. In 1951, his father Fred enrolled him in the Kew-Forest School for kindergarten, and he stayed there until seventh grade. When he was 13 years old, his father sent him away to the New York Military Academy, a rigorous military-themed boarding school in the Hudson Valley—to “get him in line” because he was too “rambunctious,” Trump told The Washington Post last year. He completed his high-school education there and graduated in 1964.

Attending private institutions would not have inoculated the president from the retrograde learning of this era, because private schools often used the same history textbooks and curricula as their public counterparts.

Trump’s high-school education coincided with the resurgence of the civil-rights movement and its push to improve American history classes. The fight has its roots in World War II. Defeating Nazi Germany and its racist ideology inspired a new generation of black activists, Zimmerman said. Spurred by the wartime realignment of the American economy, thousands of black families left the South for new opportunities in the North and the West during the Second Great Migration in the 1940s. They quickly encountered stark differences in what their children learned about America’s past. Segregated black schools in the South had often used works by black scholars like Carter Woodson, who became known as the father of black history, and W.E.B. Du Bois to teach history. Northern and Western schools followed a different path. Their textbooks about slavery and the Civil War prompted protests from black families and community leaders.

African American parents and students emerged as the strongest voices in protesting history curricula. Major black newspapers like the Chicago Defender and the New York Amsterdam News regularly covered new developments in the fight. Civil-rights organizations like the NAACP and the Urban League appointed committees to review textbooks and push back on flawed material. They pressured public officials and textbook publishers to present a more accurate and comprehensive view of black Americans in history.

“For more than 100 years, the American educational system has revolved around four basic R’s—reading, ‘riting, ‘rithmetic, and racism,” historian Lerone Bennett Jr. wrote in Ebony magazine in 1967. “By sins of commission and omission, by words said but also by words not said, facts conveniently overlooked and images suppressed, the American school system has made the fourth R—racism—the ground of the traditional three-R fare.”

New York’s schools were no different. A 1957 report found a textbook on the city’s recommended list which, while roundly condemning its violence, said of the postwar Ku Klux Klan, “Its purposes were patriotic, but its methods cannot be defended.”

In 1960, four years before Trump graduated high school, Albert Alexander, a textbook analyst for the New York City Board of Education, complained that publishers had warped their coverage of the Civil War so their products could be sold in both the North and the South. He noted that four of the textbooks used in city schools only referred to the conflict as the “War Between the States,” the segregationist South’s preferred term.

In 1966, Irving Sloan, a New York social-studies teacher, published a study for the American Federation of Teachers reviewing how contemporary American history textbooks covered black history. He opened by observing that many publishers had improved their coverage in recent years. But he also qualified his praise of their progress, noting that “none of the texts have completely succeeded, and several are so far from the target that they invite suspicion.”

Sloan noted, for example, that even some newer textbooks “still cling to the romanticized versions of the happy slave life.” Abolitionism was mostly depicted as a solely white movement. “No text gives enough attention to the participation of Negroes in this struggle for their freedom,” he observed. Things got worse when students moved past the Civil War. “In analysis after analysis of the texts, the reader will find the statement that after Reconstruction ‘200-300 pages pass before we get a reference to the Negro,’” Sloan wrote. “This is why whites do not always ‘see’ Negroes. As Ralph Ellison puts it, they are ‘invisible.’ And the reason they are unseen is that they are left out from such a large part of American history.”

The quality of the textbooks reviewed by Sloan varied. He praised the junior-high text Land of the Free for its quality, which he partly credits to eminent black historian John Hope Franklin’s co-authorship. Others received more scathing treatments. Sloan’s critiques of a senior-level high-school history textbook titled Our Nation From Its Creation typify the most common errors he encountered.

In a section dealing with different opinions about the causes of the “War Between the States,” the authors include the opinion of ‘more and more Northerners and some Southerners … that slavery was a moral evil and had to go.” The text's presentation of the Southern response to the moral question is worth quoting in full: “Aren't our slaves much better off than your so-called free workers in the filthy factories of the North? One Southern writer suggested that the so-called free laborers of the North would be better off if the North turned them into slaves.”

[...]

Coming to the period after the war, the Reconstruction era, the authors discuss the condition of the Freedmen. A statement such as, “Some thought that now that they were free, life was going to be one long spree, without work,” is at best gratuitous and at worst unsupportable. But it remains consistent with much of the tone of this text's treatment of the Negro.

“Since the authors of the text are New York City teachers, it probably has wide use in the city,” Sloan concluded. “What is more, it probably has wide use in the South. Among high school texts, this gives one of the poorest treatments of the Negro encountered in our study.”

Racist material permeated other sections of the American curriculum, well beyond the field of history. Geography textbooks depicted Africa as “the dark continent” and either ignored it or portrayed it as a place of cannibalism and barbarity. “[Black] critics condemned biology textbooks, which often reflected eugenic theories of racial hierarchy,” Zimmerman wrote in a 2004 article on U.S. textbook changes after the Supreme Court’s Brown v. Board of Education decision. “Still other blacks attacked music textbooks for including songs by [prolific 19th-century songwriter] Stephen Foster, complete with Foster’s original lexicon—‘darkey,’ ‘nigger,’ and so on.”

These textbooks shouldn’t be interpreted as reflecting their readers’ views, Zimmerman cautioned me. Instead, they offer a window into what students would have learned in a previous era. “This tells us more about the culture of race as expressed in the curriculum than it does about what any given individual imbibed or not,” he explained.

With the horrors of slavery diminished and its presence occasionally justified, it’s easy to see how someone from Trump’s generation could view the Civil War as a conflict whose core tensions could be “worked out” without violence. Trump himself has recently embraced other extraordinary views of that era. After a deadly attack on demonstrators protesting a white-nationalist rally in Charlottesville, Virginia earlier this month, he became an avowed defender of Confederate statues.

“So this week, it is Robert E. Lee. I noticed that Stonewall Jackson is coming down,” he said at a Trump Tower press conference on August 15, referring to two Confederate generals’ statues. “I wonder, is it George Washington next week? And is it Thomas Jefferson the week after?” His embrace of the statues and the white-nationalist movement defending them served clearly political purposes, but it also betrayed a flimsy understanding of the country’s history: Washington and Jefferson devoted their lives to setting the American experiment in motion; Lee and Jackson killed thousands of their countrymen in an attempt to end it.

Of course, Trump is far from the only American politician with an outdated understanding of the Civil War era. In a January 2016 town hall in Iowa, Hillary Clinton—who is one year younger than Trump—said that had he not been killed, Abraham Lincoln’s more tolerant policies may have hastened national reconciliation, and that what actually happened left white Southerners “feeling totally discouraged and defiant.” My colleague Ta-Nehisi Coates noted similarities between Clinton’s statement and the Lost Cause view “that Reconstruction was a mistake brought about by vengeful Northern radicals.”

For Trump and Clinton’s generation, the curriculum’s impact may be measurable. In August 2015, a McClatchy-Marist poll asked American adults whether schools should teach that slavery was the main cause of the Civil War. Sixty percent of 18- to 29-year-olds said they should, as did 59 percent of 30- to 44-year-olds and 57 percent of 45- to 59-year-olds. Support then dropped off markedly among those who would’ve been offered more retrograde views of the Civil War in school: Only 49 percent of Americans over the age of 65 thought slavery should be taught as its main cause, the poll found.

By the 1970s, activist pressure brought about significant changes in how history classes would be taught. But how American children learn the history of non-white groups is still controversial, and led to a recent federal court battle in Arizona. During a wider clash over laws targeting undocumented immigrants in 2010, the state legislature banned classes that “promote resentment toward a race or class of people,” that are “designed primarily for pupils of a particular ethnic group,” or that “advocate ethnic solidarity instead of the treatment of pupils as individuals.” Judge A. Wallace Tashima ruled Wednesday that the law violated the First Amendment because “both [its] enactment and enforcement were motivated by racial animus,” citing disparaging blog posts about Mexican immigrants by the statute’s author.

The fight over fair treatment in textbooks and curricula also continues. In 2015, an African American student in Houston noticed his geography textbook described the slave trade as bringing “millions of workers” to plantations across the South, eliding the difference between mass immigration and indentured servitude from Europe and the enslavement of Africans. He sent a picture of it to his mother, whose criticism of the phrasing went viral on social media. McGraw-Hill Education, the book’s publisher, apologized and said it would revise future editions.

That incident, Zimmerman noted, evoked a previous generation of textbook battles that had before reshaped American history education. “And again the reason that it changed was that people of color objected, thank God,” he said.