Just over two decades ago, Rwanda was swept up in a murderous wave of ethnic violence that was as bad or worse as anything happening today in Iraq and Syria. The conflict was between a historically dominant ethnic minority and a historically oppressed majority, as in Iraq. Yet, today, Rwanda is a relatively successful country.

Economic growth has been hovering at about 8 percent a year for the past few years. Since 1994, per capita income has almost tripled. Mortality for children younger than 5 is down by two-thirds. Malaria-related deaths are down 85 percent. Most amazingly, people who 20 years ago were literally murdering each other’s family members are now living together in the same villages.

So the question of the day is: Does Rwanda’s rebound offer any lessons about how other nations might recover from this sort of murderous sectarian violence, even nations racked by the different sort of Sunni-Shiite violence we’re seeing in the Middle East?

Well, one possible lesson from Rwanda is that sectarian bloodletting is not a mass hysteria. It’s not an organic mania that sweeps over society like a plague. Instead, murderous sectarian violence is a top-down phenomenon produced within a specific political context.

People don’t usually go off decapitating each other or committing mass murder just because they hate people in another group. These things happen because soul-dead political leaders are in a struggle for power and use ethnic violence as a tool in that struggle.

If you can sideline those leaders or get the politics functioning, you can reduce the violence dramatically. These situations are gruesome, but they are not hopeless.

A few important things happened in Rwanda:

First, the government established a monopoly of force. In Rwanda, this happened because Paul Kagame won a decisive military victory over his Hutu rivals. He set up a strongman regime that was somewhat enlightened at first but which has grown increasingly repressive over time. He abuses human rights and rules by fear. Those of us who champion democracy might hope that freedom, pluralism and democracy can replace chaos. But the best hope may be along South Korean lines, an authoritarian government that softens over time.

Second, the regime, while autocratic, earned some legitimacy. Kagame brought some Hutus into the government, although experts seem to disagree on how much power Hutus actually possess. He also publicly embraced the Singaporean style of autocracy, which has produced tangible economic progress.

This governing style can be extremely paternalistic. It is no longer officially permitted to identify people by their tribal markers (everybody knows anyway). Plastic bags are illegal. The civil service is closely monitored for corruption. In sum, Rwanda is a lousy place to be a journalist because of limits on expression, but the quality of life for the average citizen is improving rapidly.

Third, power has been decentralized. If Iraq survives, it will probably be as a loose federation, with the national government controlling the foreign policy and the army, but the ethnic regions dominating the parts of government that touch people day to day. Rwanda hasn’t gone that far, but it has made some moves in a federalist direction. Local leaders often follow a tradition of imihigo — in which they publicly vow to meet certain concrete performance goals within, say, three years: building a certain number of schools or staffing a certain number of health centers. If they don’t meet the goals, they are humiliated and presumably replaced. The process emphasizes local accountability.

Fourth, new constituencies were enfranchised. After the genocide, Rwanda’s population was up to 70 percent female. The men were either dead or in exile. Women have been given much more prominent roles in the judiciary and the parliament. Automatically this creates a constituency for the new political order.

Fifth, the atrocities were acknowledged. No post-trauma society has done this perfectly. Rwanda prosecuted the worst killers slowly (almost every pre-civil-war judge was dead). The local trial process was widely criticized. The judicial process has lately been used to target political opponents. But it does seem necessary, if a nation is to move on, to set up a legal process to name what just happened and to mete out justice to the monstrous.

The Iraqi state is much weaker than the Rwandan one, but, even so, this quick survey underlines the wisdom of the approach the Obama administration is gesturing toward in Iraq: Use limited military force to weaken those who are trying to bring in violence from outside; focus most on the political; round up a regional coalition that will pressure Iraqi elites in this post-election moment to form an inclusive new government.

Iraq is looking into an abyss, but the good news is that if you get the political elites behaving decently, you can avoid the worst. Grimly, there’s cause for hope.