The bitterness unleashed by the Donald Trump-Hillary Clinton election battle has some worrying about what happens if the US election results are challenged.

But for all its ugliness, the 2016 campaign in the United States is tame stuff compared with elections in less robust democracies.

In many countries, when presidential candidates refuse to accept defeat, chaos follows.

Here are some examples of disastrous outcomes overseas, and a few reasons why the US might survive this election unscathed.

Unhappy voters torch the parliament building in Gabon after elections in 2016

The charred interior of the parliament is seen after it was burned in post-election protests in Libreville, Gabon. Credit: Edward McAllister/Reuters

People in the tiny West African nation of Gabon waited more than three days this year while their presidential election votes were being counted. When incumbent Ali Bongo was announced the winner with a 1 percent margin, his opponent Jean Ping charged the government with vote rigging. Ping supporters rioted in the normally peaceful capital, Libreville, and set the parliament building on fire.

In the security clampdown that followed, a thousand rioters were arrested. Challenger Jean Ping, as of this writing, has yet to accept his loss.

Nigerians riot after a contentious vote in 2011

A mosque is set on fire by protesters after the release of the presidential elections results in Kano, northern Nigeria, April 18, 2011. Credit: Afolabi Sotunde/Reuters

Human Rights Watch reported that 800 people died in Nigeria following a contested election in April 2011.

Goodluck Jonathan, a Christian from the country's south, had edged out Muhammadu Buhari, a northerner and a Muslim. When Buhari refused to accept the outcome of the vote, Nigerians steeped in long-simmering resentments broke into protests along ethnic and religious lines, which were followed by murderous mob violence that continued for three days.

Iranian authorities suppress opposition protesters after the election in 2009

Iranian security personnel ride past burning debris on the streets in Tehran on June 20, 2009. Credit: Stringer Iran/Reuters

When Iran’s sitting President Mahmoud Ahmadinejad was re-elected by what looked like a landslide in June 2009, the leading opposition candidate, Mir Hossein Mousavi, suspected vote rigging. Mousavi asked the government to throw out the election results.

In the following days thousands of protesters marched, riot police were deployed and demonstrators were arrested. Some were killed. Even Iran’s top religious leader Ayatollah Ali Khamenei could not calm dissent that led to more protests, clashes and arrests that would continue for months.

Kenyans go to war with each other after the 2007 election

Riot police move to dismantle a burning roadblock in Nairobi, Kenya on Dec. 31, 2007. Credit: Noor Khamis/Reuters

Perhaps the worst election outcome in recent memory came in December 2007 in Kenya. President Mwai Kibaki, a Kikuyu tribesman, announced his victory over Raila Odinga, a member of the rival ethnic group known as the Luo. The New York Times reported that 15 minutes after the president’s victory speech, Odinga supporters poured into Nairobi streets and began setting Kikuyu homes on fire. Two months later violence was quelled across the country, but more than 1,200 people had been killed and 600,000 people had been forced to flee their homes.

"There was a great deal of international focus on Kenya after the 2007 elections because of the degree of violence and concern that it would be repeated in 2013," says David Carroll, head of the Carter Center's Democracy Program. "There were many, many efforts by Kenyan organizations and international organizations to try to make sure that there was not a repeat."

Built-in protections for the 2016 US election?

Donald Trump and Hillary Clinton take part in their third and final 2016 presidential campaign debate in Las Vegas, Nevada, Oct. 19, 2016. Credit: David Becker/Reuters

Carroll's Democracy Program team has monitored more than 100 elections in dozens of countries since 1989. Carroll says it's not unusual for an election to conclude with one side or the other unwilling to concede.

"There is often a high degree of mistrust in the election administration or in the ability for there to be a good process," he says. "So it's quite common that there is likely to be a very unhappy large segment of the population after the election."

In the run-up to US elections on Nov. 8, concerns persist over charges of vote rigging and Donald Trump's unwillingness to pledge, in advance, to abide by election results should he lose.

Carroll is surprised at the political mood in the US right now. "This is the first time that I can remember in all of my work on elections where the US context is starting to rival what we've seen in other countries in terms of the very serious political divides, anxiety, concern. ... Even just the level of political discourse is worse than I've ever seen it in the United States."

But Carroll is quick to point out that the United States has some built-in protections that aren't found in fledgling democracies.

He says US elections are transparent. Citizens, media, political parties and others all have the ability to check election results. "We have a very decentralized system," he says, "so [while] there are things that will vary by state and even by county ... in general ... there's a very good ability for the election data to be reviewed and analyzed and checked for accuracy."

And when election results are, for some reason, uncertain — as they were in the 2000 Bush-Gore contest — the question about who won does not need to be decided in the streets. "We have the ability to try to pursue any complaints through a variety of legal channels," Caroll points out.

Carroll says that no matter how unhappy some US voters will be on Nov. 9, it's unlikely that we'll see the kind of violence that roiled Kenya, Iran, Nigeria and Gabon. Transparency and a well-established court system bolster US democracy, he reiterates. "Those are two of the things that set us apart from other countries, that may not have one or both of those, that will hopefully be enough to contain what I think is going to be, almost inevitably, a large percentage of Americans who are unhappy with the result after the election."

Carroll says there's a third, equally important element that helps a nation to resolve a contentious election. Candidates can lead by example, he says, to encourage their supporters to respect the vote. He says that a successful outcome relies on "strong leaders, across the board, who can, if they've lost accept the result, and if they've won, be very magnanimous in reaching out to losers."