President Donald Trump speaks about the U.S. role in the Paris climate change accord, in the Rose Garden of the White House on June 1. (Andrew Harnik/Associated Press)

David Rank served in the U.S. Foreign Service from 1990 to 2017. The opinions expressed here are his own.

This month, I resigned from the State Department’s Foreign Service, stepping down as the senior U.S. diplomat in China and ending a 27-year career. I served five presidents — three Republicans and two Democrats — and, like my colleagues throughout the Foreign Service, took pride in the tradition of loyal, nonpartisan service. I also took seriously my oath to defend the Constitution against all enemies, foreign and domestic, and the obligations that came with representing the American people.

When the administration decided to withdraw from the Paris agreement on climate change, however, I concluded that, as a parent, patriot and Christian, I could not in good conscience be involved in any way, no matter how small, with the implementation of that decision.

Over my career, I had close calls with bullets and rocket-propelled grenades, but also knew colleagues who were less fortunate. I watched from my window as a crowd surrounding our embassy howled for vengeance after an accidental U.S. airstrike. My father died while I was in Taiwan, my mother while I was in Afghanistan. I missed the birth of my first child and my only son’s senior year in high school.

After all of that, some people have asked if I am upset or angry about how my career came to an end. But the primary emotion I feel in leaving is gratitude. Gratitude to the colleagues who served with me and who went through similar experiences. Gratitude that I was able to leave the profession I loved on my own terms. Gratitude to partners from around the world who have worked with the United States for so many years to advance our common goals. And primarily, gratitude to the people of the United States, who gave me the honor to serve them and the country I love for so many years.

But, also, I worry.

I worry about the impact my departure will have on colleagues who remain. Many of these colleagues, some with decades of contributions ahead of them, share my dismay not just at the decision to withdraw from the Paris agreement but also at the unraveling of 70 years of bipartisan foreign policy that has made the world and the United States safer and more prosperous. Rather than encourage them to follow my example, I hope my departure will send a message on their behalf so that they can continue to work within the system to make things a little bit better, a little bit at a time. That work will always be honorable work and, I suspect, will be more important than ever in the coming years.

I worry about the frequently politically motivated portrayal of those who work for the American people as members of some mythical elite, separate and suspicious. Such false characterizations drive talented Americans away from public service or discourage them from entering it in the first place. My experience has been that those who work for America look like America. For my part, I certainly never felt particularly “bicoastal.” I was raised in a decidedly working-class town south of Chicago. My wife grew up showing hogs and cutting corn out of beans. Like many of my colleagues, I am a product of a public education, from grade school to grad school.

I worry about the denigration of expertise at a time when a complex world demands it more than ever. The scientific consensus on climate change is rock-solid, and yet, at a national level, we remain unable to act. Until recently, we used science to persuade others to take responsible action. Now, we muzzle science as the world wonders if we value empirical evidence at all. Saying “I am not a scientist” has become a way to avoid making hard choices. Even if you do not share my views on the moral requirement for action or on our obligation to our children, our inability to address climate change at the national level should concern you from the perspective of national security. The Defense Department has identified climate change as an “urgent and growing threat to our national security, contributing to increased natural disasters, refugee flows, and conflicts over basic resources such as food and water.” In other words, an enemy that must be addressed.

And, finally, I worry at the erosion of the bipartisan consensus on the need for U.S. leadership. It was this leadership, underpinned by the values we shared with our allies, that led to the defeat of European fascism and brought the Cold War to an end. Without U.S. leadership, the global economic system would be less transparent and less open, and the American people — and people around the world — would be less prosperous. Today, whether the challenge is our changing climate or the Islamic State, the world still needs leadership. If that leadership does not come from us, it will come from elsewhere. Others will shape the rules. Others’ values will drive the debates. Other researchers will make the breakthroughs, other businesspeople will make the deals and other workers will get the jobs. And the American people will be poorer for it.