Deadly violence, arson and widespread voter confusion marred Democratic Republic of Congo's second post-war election on Monday, raising concerns of a protracted dispute over the outcome.

Masked gunmen attacked a polling station in the southern mining province of Katanga before three of them were killed by security forces, and locals burnt down three polling stations in the neighbouring opposition heartland of West Kasai.

Many voters trekked between voting stations confused over where to cast their ballots, and scuffles broke out over shortages of voting materials and allegations of fraud.

I voted. I left at 7 in the morning. I have been to five schools, said Bercam Nzangi, a Kinshasa resident. I was able to do this but what about those mammas who can't read and write or don't have transport. This is organised chaos.

Election commission official Matthieu Mpita told reporters polling stations would remain open as long as it takes to complete voting, describing operations so far as satisfactory. Election workers began counting at some stations by nightfall.

Congo's election, pitting incumbent President Joseph Kabila against main challenger Etienne Tshisekedi and nine other rivals, is meant to gauge progress since a 1998-2003 war that killed more than five million people.

But concerns are mounting that a chaotic poll will pave the way for dispute between Kabila and Tshisekedi over the eventual results. A contested election in Ivory Coast, in West Africa, rekindled a civil war there earlier this year.

If such a standoff takes place, a lot will depend on what the other candidates (...) do and how Kabila's forces react to what could potentially be massive displays of support for the opposition in the capital, said J. Peter Pham, director of the U.S.-based Michael S. Ansari Africa Centre.

Kabila is seen as favourite in the poll after his government pushed through a law scrapping the need for a run-off if no candidate secures a majority in the first round, and the opposition failed to unite around a single candidate.

Provisional results are due December 6.

AUTOMATIC WEAPONS

Police presence was heavy in the capital Kinshasa, where at least three people were killed in violence on Saturday, and there were numerous reports of shootings after nightfall.

Angry residents made a bonfire of ballot papers in one area of Kinshasa after an electoral commission official was accused of fraud, according to international observers.

A leader of the Carter Centre election observer mission, John Stremlau, said the organisation had flagged logistical problems ahead of the vote.

What we are seeing is the cost of that in a lot of voters who are frustrated and not getting to the polls in time and not being given clear instructions as to how the procedure will work, he told Reuters.

A spokesman for the European Union observer mission said some EU observers had been pulled back from parts of the country, including areas of Kinshasa, due to security concerns.

It's obviously a problem (that we're missing the count), but it's a choice between safety and observation, Renaud Dewit said, adding that the EU mission would decide whether it was safe to redeploy teams on Tuesday.

Earlier in the day, Congolese security forces detained a dozen suspects after masked gunmen using automatic weapons attacked a polling station in Katanga.

Three people were killed, seven were arrested and five handed themselves over after being surrounded by the army, Moise Katumbi, the governor of the local Katanga province told Reuters by telephone from the city.

Human Rights Watch researcher Ida Sawyer said two policemen may also have been killed in the same attack, though that could not be confirmed.

In West Kasai, locals burnt down three polling stations and police fired shots to disperse about 100 people who gathered outside the mayor's office in the town of Mbuji-Mayi complaining they did not know were to vote.

One female RENOSEC observer was seriously injured after being attacked by crowds fearing electoral fraud in nearby Kananga, Francois Badibanga, spokesman for the Congolese electoral monitoring organisation said.

Kabila came to power when his father Laurent was assassinated in 2001. Kabila then won the 2006 poll.

Addressing the nation on Sunday evening, Kabila warned against a return to widespread violence.

Our country has come a long way, from war and conflict of every type. We must take care not to go back to that, he said.

(Additional reporting by Kenny Katombe in Goma; writing by Richard Valdmanis and Mark John; editing by Philippa Fletcher)