An agreement to end years of fighting and bring democratic elections to the Democratic Republic of Congo has been signed in South Africa. But the signing ceremony was marred by the absence of the president of Congo.

When formally approved by President Joseph Kabila, the agreement will bring into being a multi-party transitional government headed by Mr. Kabila, and four vice presidents from the warring factions as well as members of civil society. Mr. Kabila must approve the agreement within three days.

Under the agreement, the transitional government will last about two years. At the end of that time, democratic elections must be held.

The agreement also includes a transitional constitution and a plan to integrate all the fighting forces in the country into a national army. There is still no agreement on who will head the new army or on the details for restructuring and integrating the warring forces.

Delegates at the signing, which took place at a resort not far from Pretoria, expressed disappointment that Mr. Kabila failed to attend, but a spokesman for the mediators said his presence was not essential.

The five-year civil war has claimed the lives of about two million Congolese. At its height the war involved the armies of a half-dozen African states. Government forces were backed by Zimbabwe, Angola, Namibia and Chad; Uganda and Rwanda sent their forces into Congo in support of different rebel armies.

Despite the peace efforts, heavy fighting has continued across the eastern parts of Congo in recent weeks. Just before the signing ceremony the main rebel group claimed responsibility for some of the recent fighting. A representative from one of the rebel groups, the Congolese Rally for Democracy, said a military build-up in two towns had threatened the area controlled by his group's forces.

The Democratic Republic of Congo has a population of 50 million people. The last democratic elections were held at the time Congo gained its independence from Belgium in 1960.