Joshua A. Geltzer is executive director and visiting professor of law at Georgetown Law Center's Institute for Constitutional Advocacy and Protection and an ASU future of war fellow at New America. He previously was senior director for counterterrorism and deputy legal adviser at the National Security Council. The views expressed in this commentary are his own; view more opinion articles at CNN.

(CNN) President Donald Trump's critics are increasingly focused on the question of which Democrat will challenge him for the presidency in 2020. It's an important question, but another one might be even more important: Regardless of who runs in 2020, if Trump loses, will he leave the Oval Office peacefully?

Let's start with why we need to ask this question: Trump is increasingly proving himself to be a President eager to overstep his authority. Just last week, Trump displayed his willingness to invoke unprecedented presidential power to declare a national emergency utterly without justification . This week has brought a startling report from the New York Times that, for the past two years, Trump has tried to undermine the investigations by Special Counsel Robert Mueller and other parts of the Justice Department in order to, in the words of the Times , "make the president's many legal problems go away." In light of these overreaching assertions of his own authority, it's at least plausible that Trump might attempt to cling to power in ways previously unimaginable by an American president.

Thankfully, there are four steps that key actors across the American system of governance can take to get ahead of this possibility.

Remember, when Trump was merely a private citizen running for President in 2016, he became the first presidential candidate in recent memory to refuse to commit that he'd honor the results of the election if he lost . Now, he occupies the Oval Office. He's the commander in chief of the most powerful military on Earth. If he even hints at contesting the election result in 2020, as he suggested he might in 2016, he'd be doing so not as an outsider but as a leader with the vast resources of the US government potentially at his disposal.

Trump's unrelenting assaults on the media and intelligence community , augmented by his baseless insistence on widespread voter fraud , have laid the groundwork for him to contest the election results in worrisome ways by undermining two institutions Americans would count on to validate those results.

As the 2018 midterms approached, Trump appeared to preview exactly such behavior. He tweeted that he was "very concerned that Russia will be fighting very hard to have an impact on the upcoming Election" and "pushing very hard for the Democrats." Without pointing to even a shred of analysis from the intelligence community, media reports or any other sources, Trump seemed to dangle the notion that, if the elections went too badly for the Republicans, he might allege foreign interference with the vote tally to cast doubt on the validity of the results.

In 2020, with his reelection on the line, the stakes for Trump himself are, of course, wildly bigger.

All told, there's real reason to worry here. So, what can be done now to avoid a potential constitutional crisis and ensure that the 2020 election results -- whatever they might be -- are respected and that any transfer of power occurs peacefully?

While many of us worry that President Trump has fallen woefully short in addressing foreign election interference through social media that can change American voters' minds, there's nonetheless an obvious imperative to respect the actual vote tally unless the intelligence community indicates that malicious actors have directly altered it (which would be unprecedented ). Thankfully, there are four key sets of governmental actors across the United States that can commit now to certain steps that would help to isolate President Trump should he refuse to hand over power peacefully.

First is the justifiably much-maligned Electoral College. As we were reminded in 2016, elections are not determined by popular vote but by the votes of each state's and the District of Columbia's electors, who are generally chosen by the political parties at state conventions or through a vote of the party's central committee. For the sake of the rule of law and peaceful transfer of power, both parties should require anyone seeking to be one of the college's electors to pledge that they will not withhold, delay or alter their vote based on the claims or protestations of any candidate, including President Trump.

Second is Congress. It's the newly seated Congress that, in January 2021, will meet in joint session to receive the Electoral College's handiwork and count the electoral votes. Thereafter, the President of the Senate will formally announce the election's result. Unlike the electors, who haven't been selected as of this writing, we already know many who will be serving in Congress that day (with the exception of any defeated incumbents, resignations, deaths or other unusual occurrences). These senators and representatives should make a joint pledge not to delay or alter counting of the votes based on any candidate's objections. Moreover, they should pledge to hold public hearings with intelligence community leaders should those officials or any candidate suggest that vote counts were influenced by foreign election interference or for any other reason. That unvarnished testimony by intelligence professionals could debunk any claims by Trump (or any other candidate) that the final vote count shouldn't be honored.

JUST WATCHED Trump on Bernie Sanders 2020 run: He missed his time Replay More Videos ... MUST WATCH Trump on Bernie Sanders 2020 run: He missed his time 00:52

Fourth, our civilian and uniformed Defense Department leaders have a role to play. The health of our democracy rests, in part, on not involving the military in transfers of power. And that should continue. But imagine the most extreme scenario, with Congress certifying Trump's defeat but Trump refusing to leave office. In those circumstances, the military would no longer owe its loyalty to Donald Trump as of noon on January 20, 2021. And it's worth asking the Secretary of Defense and Chairman of the Joint Chiefs of Staff, as they testify before Congress in coming months, to affirm that they understand that and would act consistently with it.

Stay up to date... Sign up for our new newsletter. Join us on Twitter and Facebook

These are dire thoughts. But we live in uncertain and worrying times. Perhaps, in 2016, Donald Trump never really intended to contest a loss at the ballot box. Still, having seen him in action as President, it's surely best, as we hurtle toward 2020, to be prepared in case President Trump makes good on his threats from 2016 -- now with far more power at his disposal.

This piece has been modified to correct and clarify references to the members of Congress and the electoral college in January 2021.