Mozambique's ruling party has taken a commanding lead in elections for mayors and local assembly members, preliminary results showed.

Frelimo, which has been victorious in all elections since the end of Mozambique's civil war in 1992, looked set for convincing wins in its traditional bastions in the south.

It had won all 37 municipalities where full results were in, but was trailing elsewhere, according to the first results released by the elections office.

Polling on Wednesday was calm in zones worst affected by recent deadly fighting between government troops and supporters of the main opposition party Renamo.

Renamo boycotted the polls, arguing election laws needed to be changed.

Amid that protest the country's third-largest party, the Mozambique Democratic Movement (MDM), made substantial gains.

The MDM put up a fight in urban centres, especially in Maputo, the capital, where there has been vocal opposition against President Armando Guebuza and his party.

Incumbent Frelimo mayor David Simango was ahead with 58 percent of the vote against 39 percent for the MDM candidate.

The opposition party garnered 70 percent of the vote in the country's second-largest city, Beira, with 63 percent of votes counted.

Political duopoly

The MDM was also well ahead in Quelimane, the provincial capital of Zambezia.

This marked the first time the MDM, a Renamo break-away founded in 2009, has contested nation-wide municipal polls.

"These results are good enough to make MDM a serious opposition for next year's elections," Mozambique analyst Joseph Hanlon told the AFP news agency, predicting that "they will replace Renamo."

That would spell an end to the decades-long Frelimo-Renamo political duopoly.

"When you look at the turnouts, they were way up in Beira and Quelimane and this shows they (the MDM) can organise and it shows they can get the vote out," Hanlon added.

This kind of organisation, Hanlon said, was "something Renamo could never do."

Out of a population of 24 million, just over three million voters were estimated to be eligible to vote in 53 municipalities where polling took place on Wednesday.

"These elections in general were calm but there was a lot of fear caused by problems between the government and Renamo, but they went off without attacks," the Director of Mozambique's Electoral Observatory Guillherme Mbilana told AFP.

"The problem we saw was a lack of confidence between people and the police, particularly in municipalities controlled by the opposition. People were afraid."

There were however isolated incidents of unrest.

Police used tear gas and rubber bullets to disperse voters who tried to stay at polling stations late Wednesday in the northern town of Angoche and in Quelimane.