* Vote likely to return President Filipe Nyusi to power
* Poll will test shaky peace deal signed in August
* Opposition Renamo seeking power through council seats
* Mozambique set to become Africa's biggest gas exporter (Recasts with counting)
By Emma Rumney and Manuel Mucari
MAPUTO, Oct 15 (Reuters) - Counting was underway in Mozambique on Tuesday in an election which the president said should help anchor peace, while his opposition rival warned against any manipulation of the results.
The presidential, legislative and provincial polls will test the fragile two-month-old peace deal between the ruling Frelimo party and its old civil war foe turned political rival Renamo.
They are widely expected to extend Frelimo's decades-long rule over a southern African nation that is set to become one of the world's main gas exporters, but Renamo is hoping to benefit from electoral changes agreed in the peace pact.
The former rebel movement aims to win control of its traditional heartlands in central and northern provinces for the first time since the civil war ended in a truce in 1992.
A failure to make those gains could cause unrest and undermine the opposition's incentive for sticking to the deal, rights groups and analysts have said.
"Mozambique has chosen peace," President Filipe Nyusi said after casting his ballot at a school in the capital Maputo. He praised Mozambicans for deciding their destiny in elections and called for peace and calm to continue.
Carlos Alberto, a 22-year-old student waiting to vote at the same secondary school said he wanted to see parliament hold the executive to account and push through promised reforms in education, work, housing and other areas.
"We vote and then nothing happens," he said of his country, which has only known one party in power since its hard-fought independence from Portugal in 1975. Like Alberto, most of the 13 million registered voters were born after that date.
"We need to make some changes," he said.
A corruption scandal over government borrowing has hit the economy and damaged Nyusi's popularity.
A low-level Islamist insurgency in the north, on the doorstep of billion-dollar gas projects being developed by oil majors including Exxon Mobile Corp and Total SA , has also taken the shine off Nyusi's presidency and threatens security longer term.
Human Rights Watch decried the closure of 10 polling stations owing to insecurity in the area of northern Mozambique where the insurgency has a foothold.
Outside of Mozambique's remote north, the main security risk would come from a disgruntled opposition.
"If (the vote) is manipulated, we will never accept it," Renamo presidential candidate and party leader Ossufo Momade said after casting his ballot in Nampula, in the north.
"We have to do whatever we can do, if the people want us to," he said, without elaborating on the warning.
Momade is seen by analysts as less likely to turn to violence than his predecessor, but also as less able to maintain control of the party and supporters.
Renamo fought Frelimo for 16 years from 1977 to 1992 in a Cold War conflict that killed about a million people. It ended in a truce but sporadic violence has flared in the years since - including after Renamo challenged election results in 2014.
Under the peace deal signed in August this year, provincial governors will now be picked by the main party in each province, rather than the government in Maputo - an opportunity for Renamo to gain long-thwarted representation.
But factionalism in Renamo and the fading popularity of its leader, Momade, could yet make winning the number of provinces it wants a tall order.
Polls were officially closed at 6 p.m. (1600 GMT). The law allows 15 days for results to be announced, though they may come sooner. Both opposition parties -- Renamo and younger challenger the MDM -- have already made allegations of vote rigging.
The run-up to the vote was marked by sporadic violence, including the killing of an election observer and attacks from a breakaway group of Renamo fighters, with one person reported killed.
Reporting by Emma Rumney and Manuel Mucari; Editing by Tim Cocks, Philippa Fletcher and Lisa Shumaker