(Charles Dharapak/AP)

James B. Comey’s controversial firing has prompted discussions about removing President Trump from office. Reps. Al Green (D-Tex.) and Maxine Waters (D-Calif.) have called for the president’s impeachment. In the New York Times, Ross Douthat argued that the Cabinet should invoke the 25th Amendment and declare the president unable to discharge his duties. Others have been more cautious. Impeachment “would stoke, not calm, political anger” wrote Fred Hiatt in The Washington Post.

How would removing Trump from office affect U.S. democracy? Would it be an exemplary act of accountability — or a thinly veiled coup against an elected leader? Would it prevent major damage to the republic — or push the country into political instability?

Political science research and other nations’ experiences suggest that, without a careful process backed by a broad national consensus, removing the president would only worsen the country’s polarization.

Let’s look at other nations’ experiences

Over the past 12 months, we’ve seen two presidents impeached and ousted: Presidents Dilma Rousseff in Brazil and Park Geun-hye in South Korea. Since 1992, eight Latin American presidents have been removed from office by either impeachment or declaration of incapacity. And another may be on the way: Brazil’s new president, Michel Temer, charged with obstruction of justice, may become the next casualty in the coming weeks.

Analysts used to believe that only new democracies are prone to presidential interruptions — a term used to cover impeachments, declarations of incapacity or anticipated resignations. Many are now reassessing this assumption. Other countries may yield important lessons for the United States.

As political scientist Keith Whittington explained here this week, evidence of “high crimes” is never sufficient to indict the president. Political scientists agree on the conditions leading to an impeachment: recurrent media scandals, a floundering economy, mass protests and the collapse of the president’s coalition in Congress. Recent research I conducted with John Polga-Hecimovich of the U.S. Naval Academy shows that some of the factors that drive presidential impeachments are the same that once prompted military coups in developing countries: the radicalization of elites, social unrest and economic recession.

There is less consensus, however, on the long-term consequences of an impeachment. On the optimistic side, Kathryn Hochstetler and David Samuels have argued that presidential systems recover from this trauma rapidly. Their study of 18 countries found that presidential interruptions do not set off further government instability or reduce popular support for democracy.

Less optimistically, Leiv Marsteintredet of the University of Oslo studied 14 presidential interruptions, and found that some impeachments set off a longer period of political instability. When the president has clearly violated the constitution, impeachments are self-contained events. But when legislators remove the executive in response to broader issues, like failed policies or mass unrest, the president’s ouster tends to be just the opening act of a protracted political crisis.

What can we learn from all this?

To be an effective tool of democratic accountability, impeachment must meet two important conditions:

Proper process. Impeachment is a hybrid institution, in part legal trial and in part vote of no-confidence. Presidential constitutions require that legislators produce evidence of high crimes or maladministration to impeach the president (with a trial decided by the senate or by the supreme court, depending on the country). But the decision to impeach is ultimately driven by partisan politics. During a crisis, political passions can overcome attention to constitutional niceties. If a legislature uses shortcuts to remove a president, that can have nefarious consequences for democracy.

In 1997, for example, Ecuadorans took to the streets to demand the ouster of their unpopular president, Abdalá Bucaram. The opposition in congress lacked the supermajority required to impeach the president, so it falsely invoked the Ecuadoran equivalent of the 25th Amendment and, by a simple majority, declared the president “mentally incapacitated.” Bucaram — aptly nicknamed “the madman” — left the country. But the wrong constitutional precedent had been set. Over the next decade, Ecuador ousted every elected president.

In a republic, form is substance.

Social consensus. Corrupt presidents can be — and usually are — shielded from impeachment by loyal supporters in congress. Most legislators, however, abandon the executive when their constituents agree on the severity of the president’s crime. Successful impeachment movements usually involve cross-class, cross-party mobilizations demanding executive accountability.

If a nation is politically polarized, therefore, rushed calls for impeachment may not be a great idea. The president’s supporters easily dismiss evidence of corruption or abuse of power as media manipulation. Without real consensus, much of the population will see the ouster of an elected executive as an illegitimate act. Legislative leaders faced this predicament after they removed Presidents Fernando Lugo of Paraguay in 2012 and Dilma Rousseff in Brazil last year. Important segments of the population saw those impeachments merely as “soft coups.”

Public support for an impeachment may take a while to build. In September 1973, a survey of urban voters in the Midwest showed that two-thirds of respondents found Richard Nixon guilty in the Watergate scandal, but only one-third supported his removal from office. Not surprisingly, more than 70 percent of those who acknowledged the president’s responsibility but rejected impeachment had voted for Nixon in 1972. Scholars debated at the time whether this pattern proved that voters were too rigid. But with time and information, voters changed their minds: Nixon’s approval dropped precipitously, from 67 percent in early 1973 to 24 percent in mid-1974.

Legislators considering the use of impeachment or the 25th Amendment must therefore focus on the need to achieve broad political agreements in Congress and beyond. Unfortunately, only 15 percent of the political scientists surveyed by the Bright Line Watch project last February believed that, in elected branches of government in the United States, “majorities act with restraint and reciprocity.”

The experience of other countries, however, yields a clear lesson: Only civil legislators, willing to follow proper process and able to build broad consensus, are able to repair the long-term damage created by an uncivil president.

Aníbal Pérez-Liñán is professor of political science at the University of Pittsburgh and author of “Presidential Impeachment and the New Political Instability in Latin America” (Cambridge University Press, 2007). Follow him @aperezli.

This essay was produced in partnership with BrightLineWatch.org.