Horrifying news is once again emerging from the eastern Democratic Republic of the Congo. Bands of heavily armed criminals are rampaging through the region, carrying out massacres and raping women by the thousands. By some standards their terror campaign is worse than the one being waged in Darfur.

This violence can only be understood against the background of the civil war that was fought in neighbouring Rwanda during the 1990s and culminated in the 1994 genocide there.

Much of the looting, killing and raping now afflicting the eastern Congo is being carried out by men who helped perpetrate the Rwandan genocide. They should be terrorising Rwanda, not the Congo. The reason they are not doing so is that Rwanda has chased them out, recovered from the horror of the 1990s and, amazingly, become peaceful and secure.

Few neighbouring countries in the world pose as stark a contrast as these two. The Congo is huge, nearly 100 times larger than Rwanda. Its natural wealth, concentrated in eastern provinces near the Rwandan border, is spectacular. Yet these provinces live in chaos and anarchy. Warlords and looters of all sorts, including the kind that wear suits and work for multinational corporations, plunder its mineral riches while huge populations live miserably and die pitifully.

Rwanda, by contrast, is tiny, about the size of Belgium or Maryland. It is landlocked, has few natural resources and lived through a horrific spasm of mass murder barely more than a decade ago. Yet it is at peace and full of hope.

President Paul Kagame of Rwanda, who led the army that deposed the genocidal regime in 1994, is a controversial figure. Many development specialists deeply admire him, and consider Rwanda one of the most promising poor countries on earth. Western human rights groups, however, portray him as a quasi-dictator. What is certain is that he has stabilised a country that not long ago seemed headed for endless war.

When people in the eastern Congo go to sleep at night, they cannot know whether they will be murdered before sunrise. Rwandans, however, walk their streets without fear. Violent crime is rare. The capital, Kigali, is among the safest cities in Africa. In Rwanda there are no warlords, rebels or insurgents.

President Kagame did not achieve this miracle peacefully. In the late 1990s he crushed a brutal insurgency with tactics that were often themselves brutal. Twice he sent Rwandan soldiers to invade the Congo and kill soldiers from the defeated genocidal army who were encamped there. They also killed many civilians.

With a combination of military force and domestic development, Rwandan leaders have brought peace to their country. One result of their success, though, is that since thousands of unrepentant Rwandan exiles who participated in the genocide have no hope of invading their homeland, they have taken instead to terrorising the eastern Congo.

President Kagame is an authoritarian leader. He won election to the presidency in 2003 with a reported 95% of the vote. Directly criticising him, his regime or his army can be dangerous, and appealing to ethnic identity is a strict taboo. Yet Kagame has brought his country something that few expected it would ever have: security.

For miserably poor people like Rwandans, whose average annual income is less than $500, what matters most after food and water is security. The regime has given them that. Few specialists were surprised when the recently announced Index of African Governance, which seeks to quantify the performance of African governments, named Rwanda as the continent's most improved country over the last five years.

To find out why Rwanda was singled out for this recognition, it is only necessary to look across the border to the heart-rending brutality plaguing the Congo. The contrast reflects a truism that idealists in western countries often ignore. Security is the essential factor in nation-building. It cannot be an end in itself, nor should it be so overbearing that people feel repressed. Without security, though, there can be no development and no progress. Nowhere on earth is this clearer than on the two sides of the Congo-Rwanda border.