Being the mayor of any city is one of the greatest personal and professionally rewarding and challenging endeavors that any person will ever undertake in their lives. I had that honor for eight years, and I will be forever grateful to the citizens of Philadelphia for giving me and my family the privilege to serve our city.

We are now experiencing one of the great health, social, and economic challenges in recent history in our city, our country, and our world. The coronavirus pandemic will change our city and our people — and we need a strong leader to guide us through this moment in history.

Philadelphia has certainly had its share of triumphs and crises over the last few decades, each requiring the leader of the city to demonstrate remarkable, bold, and at times controversial leadership to carry us through stormy and difficult times.

I was mayor during the Great Recession. One important lesson from that experience is that “you don’t pick your challenging moments, they pick you.” We, like the rest of the world, had no idea that the Great Recession had already started the month before I was sworn in as mayor in January 2008. What happened during that time was incredible — people lost their jobs, their health care, their homes, their pensions, their businesses — and very nearly a sense of hope. The Great Recession nearly devastated our City of Brotherly Love and Sisterly Affection.

What gave me hope every day was the spirit, resilience, and commitment of my fellow Philadelphians that we were all in this together — what we called a “shared sacrifice.” I knew and believed that every day, if we were honest with Philadelphians about why we were proposing what we were proposing, if we exhibited good and sound judgment, if we communicated regularly and firmly, if we showed in our actions, words, and deeds that we understood the pain and hardship of our requests for their sacrifices, that most of our citizens would understand. Even if they complained about our proposals and ideas, they knew we cared about their safety and welfare — even if it was painful, inconvenient, or aggravating. That’s called leadership.

Leadership means being bold, it means doing what needs to be done, even when you don’t want to or you’re concerned that it will upset some, offend others, or make you unpopular as an elected official. It is not your duty to be popular as an elected official (although that’s nice), but rather your job is to be effective, efficient, productive, caring, and decisive. That is the job!

You don’t pick your challenging moments, they pick you.

One example of a time when I had to make an unpopular choice for the good of the citizens of Philadelphia is when I signed an executive order on inauguration day to declare a crime emergency. People were unhappy about this, but I knew that this measure could save lives, and it was my job to make sure the people of Philadelphia are safe.

In my time as mayor, I know I made some mistakes, and we didn’t always get it right. I was a public servant, and not a perfect servant. In my public service, though, I was guided by one very important and fundamental principle: “The fundamental duty of any government is to provide for the safety and protection of its citizens.” That was my North Star, and that’s what I thought about every day I served — how can my decisions help ensure the greatest level of protection for the largest number of people.

We are now faced by the enormity of that question right now, as Philadelphia faces the outbreak of the coronavirus.

Leadership is a lonely place. It is in these moments that leaders often have to cast aside their own personal or political concerns and ask the fundamental question: What is the right thing to do now, to ensure the safety and protection of the greatest number of my citizens now and for tomorrow?

That is what leadership is all about — and that is what Philadelphia, and all of our cities, need right now.

Michael Nutter was mayor of Philadelphia from 2008 through 2016.