I’ve spent most of my life studying my country’s history and, in particular, the ways it has so consistently and systematically failed to live up to its ideals. Those are the ideals that justified its bloody founding — the ideals Americans say make their country exceptional. We are a beacon of liberty in a world of darkness, are we not?

For me, it has always seemed like basic honesty to be willing to test those claims against the historical reality. No one likes a hypocrite, right? Especially when fundamental principles like freedom and equality are at stake. We wouldn’t want to be like those other places we despise and promise never to become. The places that proclaim their principles only to traduce them when it’s convenient.

That’s why we study history. And if we have the strength to see, we learn that from its very inception ours has been a deeply flawed democracy. Our past is replete with genocide, slavery, racism, labor exploitation, misogyny, intolerance, mob rule, lynching and state-sponsored violence of every sort. Every hero we honor — from Martin Luther King Jr., to Susan B. Anthony, to Caesar Chavez — was spat on and kicked, by mobs composed of our grandfathers and great-grandmothers and great-great-aunts and uncles and distant kin we’ll never name. Those relatives collected the ashen bones of the prophets and made trophies of the flesh that remained.

Somehow, it’s always supposed to come right. Somehow — we tell ourselves — it’ll work out. This is America, after all. We’ve seen the movie. The bigots are always overcome, and the path toward a fuller democracy is always set right.

The problem is, the bigots have always believed they are just as American as everyone else. And why not? They’re right. As much as our history is a history of expanding freedom and liberty, it is also a history of their denial. It’s a funny thing: We never say we hate just for the sake of hate. When we do things like limit voting rights, tighten immigration laws, restrict women’s control over their bodies or sanction popular violence against religious minorities, we don’t do it in the name of intolerance but in the name of freedom.

But for many Americans, this country has never been a land of liberty. For them, this country always has been a police state: a national constitution that upheld slavery, the laws and militias that supported it at the local level, the black codes and chain gangs that criminalized poverty after the slaves were freed, the segregation that enshrined their second-class citizenship in law, the exploitation and neglect that led to the urban crisis and the killings at the hand of the state of people of color that plague our streets today. And that’s just African-Americans.

I know this. I study it. I teach it. Maybe it’s made me cynical, but I prefer the term “clear-sighted.” I thought it meant that I would be a little harder to surprise.

But I am surprised to find myself grieving so heavily for a nation whose past and present imperfections I document on a daily basis. I’m surprised to learn how much I love this country. I cannot believe that I harbored so much hope for a place with such a terrible record. It turns out I did. I have shed buckets of tears over the last several days, and they just won’t stop because this country is worth grieving for.

American history is not just a history of our innumerable failings but also the history of people who have stood up to this, generation after generation, and made us better for it. It is the story of how everyday folks learned to confront and survive the police state under which they lived. Ever watch your children sold away from you as property? Ever have your loved one hung from a tree and set on fire after a mob mutilates his living body? Ever lose a child to a militarized police force that broke through the wrong door? Ever been separated from your mother because she wasn’t deemed worthy of remaining on the soil of your birth? Americans — our compatriots, our neighbors, our friends, our families — have not only witnessed that. They’ve withstood it, survived it and worked to change it.

To stand up to hatred and intolerance and a state that promotes those, that is our history, too. That tradition is the best of this nation. We are at our best when we are fighting bigots. We are most American when America is least American to us. We are most true to our values when our country is least dedicated to its own. Richard Wright once wrote, “What we endure is what America is.” But we do more than endure. We call upon the best of our nation and its heritage, so we can stand up to the bigots and haters.

I am devastated. I’ve lived through 1968, Vietnam, Watergate, Iran, Ronald Reagan and wars from Grenada to the Persian Gulf. I wept when the country gave George W. Bush another four years to kill innocent Iraqis and spend the country into chaos. I’ve resisted the vile popular racism that greeted our first president of African descent. And nothing in my historical or personal experience tells me that what just happened on Election Day is normal or that we will somehow recover from it. Never before have the American people elected to the presidency a person so utterly and completely contemptuous of our principles and our system.

It makes no sense to me. Donald Trump voters have already kicked the people they’re kicking once again. It didn’t solve their problems in the past, and it won’t solve their problems now. They’ve been voting for the very party whose policies have led them to be angry. Now they’ve inflicted on all of us a carnival barker and confidence man who has played them like a rube, exploiting their fears to serve his insatiable appetite for attention and power. And for what?

Remember the real Americans. The ones who loved their country enough to fight it when it betrayed them. The ones who fought for the best in us when the country displayed its worst. The tradition of American freedom that we know and love is built on their struggle. They did not do what Trump’s supporters have done.

To those who made the spiteful, foolish choice to vote for a billionaire faux-populist who does not understand let alone value the rule of law, here is the one irreducible fact with which they and their children and their children’s children will have to live: They left the center; they defected from the compact; they flipped the game board and went home; and they broke it, for all of us. But those who have had the most cause to do this have not done so. If they have cause for anger, how much cause have those with deep and longstanding grievances against this country? I’m sorry if that’s ungenerous, but what they have done is the essence of ungenerous.

Some make the best of things and others the worst. Americans raised for generations in the schoolhouse of intolerance steadily grew to become custodians of the country’s best self, and that is a tremendous triumph of the human spirit. Meanwhile, those spared their travails have ceased to revere that best self or even recognize who they really are. I’m afraid we are all about to receive a terrible lesson in matters the least of us have been weaned on for generations.

I’m not yet ready to watch the news, hear his name, think about the position he is to occupy and the incalculable damage that is to come. There is no solace other than our shared grief. I don’t know how we will survive this. I don’t even know that we can. I truly envy and admire those who can so quickly pick themselves up and begin to plan, forecast and fight. I am not there yet. Not even close. I am still sitting shiva for the country I didn’t know I loved so much.

Patrick Rael is a professor of history at Bowdoin College in Brunswick.