The last two main militia groups in Congo's most troubled province agreed to disarm in exchange for amnesty and army positions ahead of historic elections Sunday, officials said as bloody violence erupted in the capital, reportedly killing up to seven people.

Police fired tear gas Thursday at a campaign rally in Kinshasa that turned violent after a fire broke out at a camp for militiamen loyal to rebel-leader-turned presidential candidate Jean-Pierre Bemba.

A mob burned one soldier alive who allegedly fired into the crowd near the rally that drew 20,000 Bemba supporters to a stadium in the capital. Crowds of angry youths ran through the streets, burning and looting a nearby church where they saw posters of bearing the image of President Joseph Kabila.

The U.N. said two police were killed in the mayhem, and Bemba's officials said three civilians also died. A fire also broke out at the home of Bemba's bodyguard in which two babies died, according to an Associated Press photographer.

CountryWatch: Congo

Sunday's vote will be Congo's first democratic presidential election since independence from Belgium in 1960. Many hope the poll will bring an end to years of corruption and conflict since back-to-back wars that began in 1996.

Though a peace deal ended most fighting in 2002, much of the east, including the northeastern Ituri province, remained lawless, wracked by sporadic fighting. Clashes between rival militias in Ituri alone has left more than 50,000 dead since 1999.

The militias' agreement to lay down arms marks a momentous breakthrough that could end fighting in the northeast and ensure a peaceful presidential vote.

The two militia groups are the 10,000-strong Congolese Revolutionary Movement, a coalition of militia groups formed in December under Mathieu Ngudjolo and blamed for much of Ituri's recent violence, and the smaller Cobra Matate militia, which numbers about 500.

"We want there to be elections, we want to stop the fighting. We want peace," Ngudjolo told The Associated Press on a hill overlooking Bunia where he sat with weapons and 250 fighters.

Militia fighters still have to follow through and actually lay down their arms, however, something that has proved difficult in the past. Though about 3,500 voluntarily disarmed over the past month, no disarmament date has been set for others to hand in weapons.

Kemal Saiki, a spokesman for the 17,600-troop U.N. peacekeeping force, welcomed the decision. But he cautioned that other armed groups still exist in the east -- the site of one of the world's worst humanitarian crises despite the official end to war in 2002.

Ngudjolo said his group had agreed to the deal in exchange for amnesty and positions in the Congolese army.

Anneke Van Woudenberg of Human Rights Watch , who was in Bunia Thursday, said her group was "very concerned" at such dealmaking.

"It sends a signal that if you want to become a colonel, you should pick up your gun and kill people," she said.

Two weeks earlier, another Ituri militia led by Peter Karim — which was accused of capturing and releasing seven Nepalese peacekeepers in May — also agreed to disarm. Army officials had said Karim would become a colonel in the army.

Gen. Mbuayama Nsiona, the commander in charge of army operations in Ituri, said the disarmament deal would "allow people to vote en masse on Sunday" — in peace.

U.N. and Congolese forces have been trying to quell violence in the east that aid groups say contribute to the deaths of some 1,000 civilians daily, most through strife-related disease or hunger.

Thousands of rebel and militia fighters have joined the military under a postwar, transitional administration led by Kabila, but unknown numbers still fight in the countryside of the vast Central African nation.

Kabila is considered the front-runner in Sunday's vote, but no candidate in the field of 33 was expected to win the majority needed to avoid a runoff. A runoff election between the top two candidates would be held within weeks of the initial ballot's results if the first-round does not yield a clear winner.

A monthlong campaign period ends Friday. Political violence since then has left at least 23 dead.

Bemba is one of Congo's four vice presidents. Before he spoke at Thursday's rally, a fire broke out at a militia camp for militiamen loyal to him. No serious injuries were reported, but the unexplained blaze destroyed most of the shacks that made up the camp.

When news of the fire reached the stadium, melee erupted and witnesses said a member of the security forces fired on the crowd, striking at least one civilian in the legs. A mob overwhelmed the shooter and burned him alive. Police confirmed the soldier died and U.N. official later put the toll at two police dead.

Reporters saw at least six people wounded, and said police fired tear gas.

The rally went on despite the chaos.

During a speech, Bemba said he would liberalize Congo's economy if elected and refuted rumors that he ate human flesh, declaring he is "not a cannibal."

"Congo is built on lies, but I'm telling you the truth," said Bemba.