The world is not deterministic. People have a say. If ever there was any doubt, Nigeria belied that notion with elections in March and April of this year in which the sky did not fall as just about everybody feared it might. Yes, there were reports of rigging and violence at various levels. But cooler heads prevailed and Nigeria stepped away from the brink.

The underlying drivers have not gone away, but the trigger that elections so often represent was recognized early and dealt with in a statesmanlike way by individuals in leadership who had the public interest of the Nigerian people at heart. Civil society stepped up. Early Warning systems were established. Civic education was prioritized. Forums were held across the country sensitizing youth as to the dangers of election violence. Thousands of traditional rulers, public officials, youth and women’s leaders, and human rights activists joined the Partners for Peace Network in the Niger Delta to work for non-violent elections. Professor Attahiru Jega, the chairman of the Independent National Electoral Commission (INEC) withstood all manner of political pressure and logistical challenges to ensure that the election would be as credible as possible. The two leading candidates, incumbent Goodluck Jonathan and Muhammadu Buhari signed a pact, eschewing violence and promising to respect the outcome. Then when the results were still coming in and it became clear that that challenger Buhari was going to win, in an unprecedented move President Jonathan called Buhari and congratulated him, setting the tone for a peaceful transition.

Conflict drivers in Nigeria are complex and overlapping. Issues of poverty, inequality, a high dependence on oil exports for government revenue, corruption and patronage networks, as well as challenges around public health, infrastructure, education, and access to finance abound. Zero-sum fault lines spider-webbing across society spark sectarian, inter-communal, intra-communal, political, and criminal violence. Communal violence, often between pastoralists and farmers, occurs in the Middle Belt. In the oil rich Niger Delta region, violence often relates to competition over “resource control.” In the Northeast, the so-called “Boko Haram” insurgency has killed thousands since it burst onto the scene in the summer of 2009.

Last year was especially difficult for Nigeria. Insurgency in the Northeast was more intense than ever before, even breaking into the international mainstream media headlines with the abduction of hundreds of school girls in Chibok. Political polarization was mounting as the opposition All Progressives Party (APC) was emerging as a real threat to the status quo. Oil prices were down, putting pressure on public service and patronage networks alike. Conventional wisdom had it that if Jonathan won, it would be hell in the North and if Buhari won, it would be hell in the South. But when push came to shove, Jonathan took the higher ground. Armed groups in the Niger Delta, as it turns out, are more transactional than ideological. As we suspected, the gubernatorial elections were more violent than the presidential elections in the Niger Delta, especially in Rivers State. But even there, it could have been much worse.

It still might. The conflict drivers have not gone away. After the election, a strike by fuel importers brought the economy to a temporary standstill; long lines of cars and trucks formed at gas stations, sitting immobile for hours at a time. Black market prices spiked. And now it appears that the ex-militants in the Niger Delta are starting to rattle their sabers once again, threatening violence in a bid to influence the new administration. Meanwhile in the North, Boko Haram continues to detonate bombs. In the Middle Belt, land and pastoral conflicts continue.

But if we’ve learned anything from the Fragile States Index and the events of the last few months, it is clear that even in the most polarized of environments, under the highest levels of social, economic, political and security pressure, if there is clarity about the risk, and engagement by all levels of society to anticipate and dampen the effects of trigger events, the worst can be avoided. And perhaps in the long run, peace can be sustainable.