​The historic elections in Zimbabwe officially finished in the early hours of Friday morning with Emmerson Mnangagwa, the ally turned enemy of Robert Mugabe, declared the winner by a narrow margin.

But the outcome leaves an already fractured country with bitter divisions and an uncertain future with the fallout from the bitterly disputed polls due to continue.

The opposition immediately refuted the result and warned of widespread protests, raising fears of further violence after troops shot six people dead and injured more than 30 in clashes with protesters on Wednesday.

Mr Mnangagwa passed the threshold for a first round victory of 50 per cent by 0.8 per cent while his main rival, Nelson Chamisa of the MDC (Movement for Democratic Change) alliance got 44.3 per cent.

The opposition leader, who had declared himself the winner before, during and after the voting refused to accept he had been defeated and accused the country’s election commission of being in collusion with the ruling Zanu-PF party.

The acrimony which has marked the campaign was present right at the end with the MDC chairman Morgan Komichi taking to the stage at the Zimbabwe Election Commission (ZEC) offices during the announcement of the result to claim that the figures being presented were false.

Zimbabwe's president says he is "humbled" by his win. (AP)

Mr Komichi was taken out by security guards after protests from Zanu-PF ministers and officials present but not before he had been able to denounce Mr Mnangagwa’s victory as fake in front of a swathe of international media present to record the results.

“The elections are fraudulent; everything has been done illegally," he declared.

In pictures: Zimbabwe votes in historic election Show all 55 1 /55 In pictures: Zimbabwe votes in historic election In pictures: Zimbabwe votes in historic election People in Mbare celebrate after officials announced the re-election of President Emmerson Mnangagwa Getty Images In pictures: Zimbabwe votes in historic election Supporters celebrate at the Harare International Convention Centre in the early hours Getty Images In pictures: Zimbabwe votes in historic election People in Mbare celebrate Getty Images In pictures: Zimbabwe votes in historic election People in Mbare celebrate Getty In pictures: Zimbabwe votes in historic election Supporters sing and dance soon after the announcement EPA In pictures: Zimbabwe votes in historic election Supporters sing and dance soon after the results of the Presidential elections were announced at the Harare International Convention Centre EPA In pictures: Zimbabwe votes in historic election A vendor sells sponges near newspaper headlines on the streets of Harare AP In pictures: Zimbabwe votes in historic election Supporters of the newly reelected Zimbabwe President Emmerson Mnangagwa celebrate in Mbare AFP/Getty Images In pictures: Zimbabwe votes in historic election People in Mbare celebrate Getty Images In pictures: Zimbabwe votes in historic election A man reads a Zimbabwean newspaper the day after the violence on the streets of Harare EPA In pictures: Zimbabwe votes in historic election A soldier fires shots towards demonstrators AFP/Getty Images In pictures: Zimbabwe votes in historic election A wounded man reacts at the sight of soldiers while taking shelter in a stall at a market in Harare AFP/Getty Images In pictures: Zimbabwe votes in historic election Supporters of the opposition Movement for Democratic Change party (MDC) light a fire in the streets of Harare. Reuters In pictures: Zimbabwe votes in historic election Soldiers open fire to disperse crowds of the opposition Movement for Democratic Change supporters outside the party's headquarters in Harare REUTERS In pictures: Zimbabwe votes in historic election Opposition MDC party supporters hold a voting placard up high on a street in Harare AP In pictures: Zimbabwe votes in historic election A supporter of Zimbabwean opposition MDC Alliance allegedly beaten up by soldiers sits with blood on his face as other protesters assist him AFP/Getty Images In pictures: Zimbabwe votes in historic election A vendor scurries for cover with her wares as soldiers disperse demonstrators AFP/Getty Images In pictures: Zimbabwe votes in historic election A wounded man hides under a tarpauling while the Zimbabwean Army patrols the streets of Harare AFP/Getty Images In pictures: Zimbabwe votes in historic election Anti-riot police officers close the entrance to the Rainbow Towers, where the election results were announced in Harare Getty In pictures: Zimbabwe votes in historic election Soldiers open fire on citizens REUTERS In pictures: Zimbabwe votes in historic election Citizens run the Zimbabwean army during protests in Harare Reuters In pictures: Zimbabwe votes in historic election Supporters of the opposition Movement for Democratic Change party (MDC) protest the result of the election, which they allege to be fraudulent Getty In pictures: Zimbabwe votes in historic election Supporters of the opposition protest in the streets of Harare as police fire tear gas AP In pictures: Zimbabwe votes in historic election A soldier assaults a man on the streets of Harare during protests AP In pictures: Zimbabwe votes in historic election Zimbabwean anti riot police officers sit in a truck amidst protesters on the streets of Harare Getty In pictures: Zimbabwe votes in historic election Citizens run from riot police amidst protests in Harare AP In pictures: Zimbabwe votes in historic election Soldiers patrol the streets during protests in Harare Reuters In pictures: Zimbabwe votes in historic election A Zimbabwean soldier beats a man on the streets of Harare Getty In pictures: Zimbabwe votes in historic election A man lies dead after the Zimbabwean army shot at protesters in Harare Getty In pictures: Zimbabwe votes in historic election A supporter of the opposition party protests in the streets of Harare Reuters In pictures: Zimbabwe votes in historic election Zimbabwean soldiers beats an opposition supporter on the streets of Harare Reuters In pictures: Zimbabwe votes in historic election Supporters of the opposition protest in the streets of Harare AP In pictures: Zimbabwe votes in historic election Supporters of the opposition protest in the streets of Harare as police fire tear gas Getty In pictures: Zimbabwe votes in historic election Supporters of the opposition burn a campaign banner of the ruling Zanu-PF party Reuters In pictures: Zimbabwe votes in historic election A man casts his vote in Mbare, a suburb of Zimbabwean capital Harare Getty In pictures: Zimbabwe votes in historic election A police officer keeps watch of queuing voters in Mbare Getty In pictures: Zimbabwe votes in historic election Voters stand in line outside a polling station in Mbare Getty In pictures: Zimbabwe votes in historic election Election officials remove political posters near a polling station on voting day Getty In pictures: Zimbabwe votes in historic election Oppostion leader Nelson Chamisa arrives at a polling station in Harare Getty In pictures: Zimbabwe votes in historic election Oppostion leader Nelson Chamisa casts his vote AP In pictures: Zimbabwe votes in historic election Zimbabwean president Emmerson Mnangagwa arrives to cast his vote in Kwekwe Reuters In pictures: Zimbabwe votes in historic election Zimbabwean president Emmerson Mnangagwa casts his vote AP In pictures: Zimbabwe votes in historic election Voters stand in line outside a polling station in Kwekwe AP In pictures: Zimbabwe votes in historic election A woman prays outside a polling station in Mbare Getty In pictures: Zimbabwe votes in historic election Voters arrive at a polling station in Harare EPA In pictures: Zimbabwe votes in historic election Former president Robert Mugabe prepares to cast his vote in Harare AP In pictures: Zimbabwe votes in historic election A woman casts her vote in Mbare, a suburb of capital Harare Getty In pictures: Zimbabwe votes in historic election A woman casts her vote in the township of Makokoba Getty In pictures: Zimbabwe votes in historic election A police officer casts his vote in Mbare Getty In pictures: Zimbabwe votes in historic election A woman prays near a polling station in Mbare EPA In pictures: Zimbabwe votes in historic election A man casts his vote in Harare AP In pictures: Zimbabwe votes in historic election Former president Robert Mugabe speaks at a press conference the day before the vote where he stated that he would not be voting for his former Zanu-PF party Reuters In pictures: Zimbabwe votes in historic election A supporter of the opposition MDC party attends the final campaign rally in Harare on July 28 Reuters In pictures: Zimbabwe votes in historic election Supporters of the opposition MDC (Movement for Democratic Change) party attends the final campaign rally in Harare on July 28 EPA In pictures: Zimbabwe votes in historic election Supporters of the opposition MDC (Movement for Democratic Change) party attends the final campaign rally in Harare on July 28 EPA

Although Mr Mnangagwa’s Zanu-PF had won the parliamentary poll by a significant margin, his personal win was far less emphatic, falling below the 53 to 55 per cent predicted by his supporters as well foreign diplomats.

His supporters, however, acclaimed his “triumph” and 75-year-old Mr Mnangagwa, who had been acting president since Mr Mugabe’s overthrow last November, tweeted that he was “humbled” to be elected president. He added: “Although we are divided at the polls, we are united in our dreams. This is a new beginning, let us join hands in peace, unity & love to build a new Zimbabwe for all.”

But the confrontation between the government and MDC continued with police raiding the party’s headquarters on Thursday, arresting people and taking away computers.

The operation was part of a security crackdown following clashes between security forces and crowds protesting against the country’s election commission saying that the ruling Zanu-PF party had won the parliamentary poll by a large majority.

Mr Chamisa and other opposition leaders were being investigated, according to a warrant of suspected “possession of dangerous weapons” and encouraging “public violence”.

But the real reason for the raid, said Mr Chamisa, was to remove evidence the party has discovered of vote rigging by Mr Mnangagwa’s Zanu-PF. “But don’t worry, the evidence has already been taken to a safe house,” he said.

Tension remained high following deadly clashes between security forces and people demonstrating against alleged election fraud (Getty)

Just hours before the election result was announced Mr Chamisa had declared that he would not accept the country’s election commission awarding a “fraudulent” victory to rival Mr Mnangagwa, adding that “neither will the people”.

He dismissed the idea of making a legal challenge against the election result saying “that would be a slippery path". He said: "When you go into the court you are going into the lion’s den. We are not going to be a meal for the lions.”

A desperate Zanu-PF government, he claimed, was “using the tactics of Robert Mugabe” as was shown by the killing of protesters. “This government does not respect life,” he said and demanded that those responsible for ordering the shooting should be prosecuted, inferring this may include Mr Mnangagwa.

“The ranks of those responsible don’t come into it. How far does it go, does it include the commander-in-chief? Does it include the highest in the land? Who ordered the army to turn its guns on the people?” he asked.

“I have visited all those injured and bereaved families, they weren’t even MDC members, but people protesting against vote rigging. And those kinds of protests will continue if they think there is further vote rigging.”

Mr Mnangagwa has accused Mr Chamisa of whipping up violence with his rhetoric. As accusations and counter accusations continue there is sense of foreboding in Zimbabwe’s capital about what lies ahead.

The normally bustling streets of Harare have been extremely quiet for most of the day with many shops shut. The military are patrolling the streets and have been telling people to go home.