The day after Christmas Liberians went to the polling stations to elect George Weah, a former international soccer player, as the new President of Liberia. Weah beat the former vice president and chief opponent, Joseph Boakai, in a run-off election. The risk of election-related violence was substantial given the overwhelming development challenges in Liberia and its history of armed conflict. Before the international community claims success for effective violence prevention through diplomacy or electoral assistance, let us recognize Liberians and their primary role in keeping the peace, in particular the National Election Commission (NEC).

After a brutal 14-year conflict that claimed an estimated 250,000 Liberian lives, the United Nations Mission to Liberia (UNMIL) stepped in to provide security and reconstruction, while leading the administration of elections in 2005 and 2011. A gradual drawdown of UN forces in recent years has put Liberian institutions back in charge. As a result, 2017 was the first presidential election fully administered by the NEC, with some technical and significant financial support from international donors. The UN Development Program, the European Union, and the US government funded most programs and materials to ensure a credible and peaceful election process. Earlier research by the U.S. Institute of Peace (USIP) has shown how critical election administration and security assistance can be for mitigating conflict in the face of a tense election.

A March 2016 survey indicated that 61 percent of Liberians were concerned that election disputes in 2017 could reignite violent conflict. Some of the most reliable predictors of election violence were present: a lack of funds and weak domestic infrastructure, a significant youth population vulnerable to mobilization, a recent history of civil war, an unpredictable race, and a police force still prone to corruption and abuse.

While declared largely free and fair by international observers, the first election round on October 10 saw several minor shortcomings, such as poor crowd control at polling places and issues with the voter roll. Poll workers did not always have the necessary equipment, and were poorly informed about their duties. Tensions were rising, since any technical mistake or delay, and any real or perceived fraud, could have encouraged candidates in a close race to mobilize their supporters and challenge the electoral outcome. Liberty Party candidate Charles Brumskine did challenge the election results in court—and fortunately not in the streets—alleging irregularities on election day. The Brumskine case was subsequently dismissed by the NEC and the Supreme Court of Liberia.

Based on the latest reports, the NEC delivered a credible and peaceful election amidst challenging circumstances. The commission was praised by observer missions and coped well with international pressures and efforts by the losing parties to delegitimize the process. Election administration in Liberia is far from perfect. But the capacity and credibility of the NEC is high considering the country’s historical and developmental context. The findings from prior USIP researchhighlight the promising role of the NEC in preventing tensions from spiraling into violent conflict. An election commission that communicates well and handles technical procedures in a professional manner limits the space for fraud accusations and disputes. The Institute’s ongoing field research in Liberia identifies the risk of election violence in carefully selected coun­ties, and the effectiveness of commonly used tools to prevent its outbreak. Such evaluative research will help domestic and international organizations develop more effective remedies for future elections in Liberia, and around the world.

The absence of widespread election violence, of course, does not indicate a broader peaceful climate. USIP data gathered from 150 localities at risk found instances of hate speech, harassment of women, and some damage to posters and banners during the election campaign and party nomination process. Budget gaps, mistrust of police and youth unemployment should remain priorities for Liberian institutions and international donors to prevent future election violence. But despite these challenges and reported incidents, the West African nation defied all odds in these elections.

To their credit, diplomats did engage quite early in democracy promotion and violence prevention. The UN followed the US example and gradually lifted all sanctions on Liberia, citing advances in democracy promotion. During an Economic Community of West African States (ECOWAS) Summit in Monrovia, all presidential candidates committed to peaceful elections by signing the Farmington River Declaration. Guinean President Alpha Condé and Togolese leader Faure Gnassingbé engaged in mediation efforts to break an impasse that had delayed the run-off election. Even earlier this week, UN Secretary-General António Guterres dispatched former Nigerian leader Olusegun Obasanjo as part of a UN “surge in diplomacy for peace.” Despite all the efforts and prominent headlines covering international diplomacy in action we should resist attributing the peaceful nature of Liberia’s election to international diplomacy alone. After all, only 17 percent of Liberians think foreign diplomats can influence local leaders.

Faith in credible institutions and a broad recognition of the cost of violence among politicians and their supporters go a long way in keeping elections peaceful. Ultimately, it is up to Liberians and Liberian institutions to ensure credible elections and the first peaceful transition of power in seven decades.