The historian Howard Zinn once said, “History is important. If you don’t know history it is as if you were born yesterday.”

On Tuesday, Maine Gov. Paul LePage defended President-elect Donald Trump from criticisms by Democratic U.S. Rep. John Lewis of Georgia. LePage patronizingly suggested that Lewis study the civil rights movement — an odd thing to say of someone who is at the center of that history.

But LePage failed his own test. Nineteenth-century Republican presidents Ulysses Grant and Rutherford Hayes could not have resisted the Jim Crow laws, as LePage asserted, because those measures did not emerge until after both men had left the White House.

In fact, Grant presided over the challenging period of Reconstruction, during which Congress defined the meaning of freedom against the South’s efforts to retain slavery in all but name. New laws and constitutional amendments created legal protections for the freed people, but the violence of white supremacist paramilitaries made enforcing the law difficult. Ultimately, popular racism broke Grant’s resolve.

Hayes’s succession to the presidency capped the tragic tale. In the 1876 presidential election, the Republican lost the popular vote to Democrat Samuel J. Tilden. He won the White House, though, securing the South’s electoral votes by abandoning Republicans’ commitment to civil rights. Reconstruction ended, leaving the freed slaves to the tender mercies of the old planter class. Clearly, these presidential failures undermined rather than promoted civil rights.

LePage’s claim that “it was Abraham Lincoln that freed the slaves” is even more pernicious. Emancipation, the most significant social transformation in American history, came about thanks to many people, Lincoln among them. But it was Congress that passed the 13th Amendment ending slavery, and the states ratified it. Where Lincoln followed, others led: the antislavery politicians who refused to compromise over whether people could be property, the abolitionists who inspired them, and the African-Americans — both free and enslaved — who tirelessly challenged laws and practices that denied their humanity.

During the Civil War, 189,000 African-Americans aided the Union cause, and 40,000 sacrificed their lives for liberty. Grant called their service “the heaviest blow yet given the Confederacy.” Rather than demanding their gratitude, Lincoln thanked African-Americans for their help.

LePage does not seem to know that, nonetheless, innumerable African-Americans did express their gratitude — from those in Richmond who greeted Lincoln in April 1865 by shouting “thank God for his goodness!” to those who in 1866 renamed the historically black Ashmun Institute in Pennsylvania in his honor. This only began a long tradition of Lincoln hagiography.

LePage’s ignorance of this past is neither trivial nor singular. Demagogues have always appealed to bigotry by twisting history. A century ago, the film “ Birth of a Nation” offered a version of Reconstruction that justified lynching and sparked the revival of the Ku Klux Klan. Today, an equally misguided vision of the past buttresses the governor’s practice of racial profiling and calls for vigilante justice.

He could stand lessons not just in history, but civics. In our system, liberty is an inalienable right. Freedom in the U.S. has always been expanded most by those who, despite suffering intolerance in a land of liberty, nonetheless worked tirelessly to bring America closer to its founding ideals. At various times, this has been the story of Irish-Catholic immigrants, women, Latinos, and even LePage’s own Franco-American ancestors. Throughout our history, the weak and marginal have always been the fiercest advocates of true American ideals.

Take Lewis who led sit-ins, freedom rides, and voter registration drives during the civil rights movement. He marched in Selma, Alabama, with Martin Luther King Jr., and he spoke in Washington in August 1963. State troopers arrested him 40 times for civil disobedience, once after fracturing his skull. But his courage and sacrifice helped secure passage of momentous pieces of legislation, like the Civil Rights Act of 1964 and the Voting Rights Act of 1965. This is the man Trump, whom the government once prosecuted for denying equal housing to African-Americans, describes as “ all talk, talk, talk — no action or results.”

Ultimately, it is up to us to safeguard our past and present. If this country is to remain a democracy, we must combat willful ignorance and the politicization of history. As Zinn, the historian, once said, “History is important. If you don’t know history it is as if you were born yesterday. And if you were born yesterday, anybody up there in a position of power can tell you anything.”

Patrick Rael is a professor of history at Bowdoin College in Brunswick. His most recent book is “Eighty-Eight Years: The Long Death of Slavery in the United States, 1777-1865.”