A candidate for U.S. citizenship holds an American flag at the U.S. Citizenship and Immigration Services field office in Miami on Friday. (Wilfredo Lee/AP)

Lisa Monaco served as homeland security adviser to President Barack Obama. Ken Wainstein was homeland security adviser to President George W. Bush. Both Monaco and Wainstein served as chief of staff to FBI Director Robert S. Mueller III.

After the carnage in El Paso and Dayton, Ohio, we are finally talking more about the increasing threat of domestic terrorism, which has killed more people in America since 9/11 than the foreign terrorism of al-Qaeda and the Islamic State. With the body count growing at an alarming rate, it is time to turn from talk to action and confront this threat before it claims more American lives.

As former homeland security and counterterrorism advisers in Democratic and Republican administrations, we saw the operational, organizational and legal changes that are needed to meet terrorist threats. In this era of polarized politics, where too often the political extremes dictate action — or more often, inaction — we need something even more important from our leaders. We need them to do their duty.

Duty is the age-old notion that one should do what is right, regardless of whether it is personally beneficial or costly. That moral equation has always been a fundamental precept of our national character. Duty is a central tenet in the Declaration of Inde­pendence, the principle that we reaffirm with the Pledge of Allegiance and the idea that inspired generations of Americans to sacrifice their lives and well-being to break from Britain, fight slavery in the Civil War, defeat tyranny and fascism in World War II, and stand up to institutionalized injustice during the civil rights movement.

Duty says our leaders should prioritize the public’s interests over their own. That means acknowledging and acting against a threat to our national security — whether from domestic extremists or Russian hackers interfering with our electoral process — no matter which constituency might object. It means working with the other party to find solutions to immigration and gun control, rather than leveraging those problems for political gain. And, it means living a life of duty that sets an example for the rest of us.

We have seen leaders choose duty over self-interest before, even quite recently. We saw it when President George W. Bush sponsored aggressive financial rescue legislation amid the economic crisis in 2008, in the face of criticism from allies and contrary to his own inclination against federal intervention in the economy. We saw it when President Barack Obama placed national security over political expediency and extended some of Bush’s counterterrorism tools, contrary to his campaign promises and the urging of many in his party.

We saw it in John McCain’s forceful rejection of a supporter’s bigoted attack on his rival during the 2008 presidential campaign, and we saw it in Bush’s dignified refusal to criticize his successor after he left the White House.

We have seen it most recently in Robert S. Mueller III’s work as special counsel investigating Russian interference in the 2016 election. For Mueller, duty is the defining force that has driven a lifetime of decisions, from enlisting in the Marines during the Vietnam War to returning in mid-career to the front lines as a homicide prosecutor in Washington.

It was not surprising that Mueller answered the call in 2017 to serve as special counsel, knowing full well that the job would probably subject him to criticism from both sides of today’s political divide, and then agreed to testify before a polarized Congress last month, knowing that it would be a lose-lose proposition. Ever the dutiful Marine, he accepted his mission, endured two years of personal attacks, and fielded questions and accusations at his hearings with dignity and dogged insistence on facts at the expense of theatrics, disappointing those who had hoped for a different style or fodder for their particular view on impeachment.

More than one reporter described Mueller and his performance as being “from another era.” Sadly, those reporters might have been right.

All too often these days, we tolerate leaders who promote their own interests at the expense of duty, especially if their political affiliation or agenda aligns with ours. We need to shed that cynical approach to politics.

Instead, we should reaffirm the importance of duty in our own political lives by looking for and lifting up the dutiful leaders among us who remain loyal to the common good. If we do that, perhaps our leaders will follow our lead and recognize the imperative to look past their own interests, to prioritize national unity over tribal division and to make the hard choices necessary to confront threats such as hate-filled domestic extremism.

Over the past two years, Mueller did his duty as a leader and citizen, as he had so many times before. In the process, he gave us a lesson in what it means to be American and what we should demand of our leaders and of ourselves. Let’s hope, for the sake of our country and our democracy, that we can learn that lesson.