* Ruling CCM party faced tough vote challenge
* Opposition has called for recount
* Zanzibar poll scrapped, stokes tensions (Adds main presidential rival rejecting result)
By Fumbuka Ng'wanakilala
DAR ES SALAAM, Oct 29 (Reuters) - Tanzania's ruling party candidate, John Magufuli, was declared winner on Thursday of a presidential election, a result his main opposition rival rejected as rigged.
The election has been the most hotly contested race in the more than half a century of rule by the Chama Cha Mapinduzi Party, which fielded Magufuli, 56, a minister for public works.
The main opposition parties united for the first time in a coalition to back a single candidate, former prime minister Edward Lowassa, 62, who had defected from CCM in July when the party snubbed his bid to be their flagbearer.
Adding to tensions on what has been one of Africa's most politically stable nations, a vote in the semi-autonomous Zanzibar archipelago, a hotbed of opposition to central government, was annulled on Wednesday by the local election commission there, citing violations.
The opposition on the island said it had won that vote and said the annulment was a ploy by CCM to avoid conceding defeat.
National Electoral Commission Chairman Damian Lubuva told a news conference that Magufuli secured 58 percent of the votes against 40 percent for Lowassa. The body dismissed complaints.
"Since John Pombe Magufuli of the CCM party got the highest number of votes ... I hereby officially declare that he has been elected as president," Lubuva said, adding that turnout was 67 percent of the 22.75 million registered voters.
Even before the final declaration, Lowassa had called for a recount. "We do not accept the results of the National Electoral Commission," he told a news conference after the final announcement, citing fraudulent activity during the count.
The opposition's own tally, based on its representatives monitoring polling stations, gave him 62 percent of the vote, he said.
Chadema, a leading party in the Ukawa coalition that backed Lowassa, also rejected the results, alongside another smaller party, an electoral official said.
Lowassa and Magufuli have drawn big crowds at rallies. Both promised to create jobs, help the poor and crack down on corruption and pledged to make sure the benefits from huge gas and other resources would trickle down to all in the nation of 47 million people.
Two independent opinion polls before voting began had given Magufuli a lead. CCM also retained its parliamentary majority.
In Zanzibar, police arrested several youths who had blocked roads in protest after voting there was annulled.
Zanzibar police commissioner Hamdani Omar Makame did not give number for those arrested but said by telephone that the situation was calm, with police patrolling the streets.
The United States and Britain both said they were alarmed by the decision to scrap the Zanzibar vote.
Election observers from the European Union, African Union and other international groups issued a statement saying it was concerned by the Zanzibar decision after the observer group had "affirmed the credibility of the voting process." (Writing by Edmund Blair; Editing by Richard Balmforth)
Our Standards: The Thomson Reuters Trust Principles.