Zimbabwe took its first steps into an uncertain future after the official end of the era of Robert Mugabe, following a landmark election, with flickering hopes of peace and stability, but also a great deal of trepidation about what may lie ahead.

Emmerson Mnangagwa, once Mr Mugabe’s loyal ally who had played a key part in overthrowing Africa’s longest serving head of state, was declared winner in the presidential poll by a very narrow margin, avoiding a second round run-off against his chief rival, Nelson Chamisa, by 0.8 per cent after getting past the stipulated 50 per cent mark.

As expected, Mr Chamisa rejected the outcome of the election, vowing to overturn it. His first reaction was however relatively restrained compared to the highly aggressive stance of the past. Twelve hours earlier he had warned of massive street protests raising fears of further violence after troops shot six people dead, and injured more than 30 in clashes with protestors on Wednesday.

On Friday morning Mr Chamisa claimed in a tweet, that “unverified, fake results” had been announced by the Zimbabwe Electoral Commission (ZEC), a body he had regularly accused of being complicit in fraud with the ruling Zanu-PF party. The 40 year old leader of the opposition MDC (Movement for Democratic Change) demanded “proper and verified results endorsed by parties” and complained of a “level of opaqueness, truth deficiency, moral decay and values deficit which is baffling”.

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 as foreign diplomats. His supporters, despite this, acclaimed his “triumph”.

The 75-year-old, who had been acting president since Mr Mugabe’s overthrow last November tweeted 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 and love to build a new Zimbabwe for all.”

The acrimony and suspicion 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 the figures being presented were false.

Mr Komichi was escorted out by security guards after protests from Zanu-PF ministers and officials present but not before he denounced 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.

The new president of Zimbabwe got early, and important, international endorsement of his win from the Chinese government, which had invested hugely in Zimbabwe. It said in a statement “as a friendly nation to Zimbabwe we call upon relevant parties to put the interest of the country and the people first and respect the choice made by the Zimbabwean people.”

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

Cyril Ramaphosa, who became president of South Africa six months ago, called Mr Mnangagwa to “express his commitment to working closely with the president-elect to enhance the historical‚ political and fraternal relations which exist between South Africa and Zimbabwe”, said a government spokesman in Pretoria.

Mr Rampahosa urged the Zimbabwean opposition to use legal channels to raise objections to the election process. However, on the eve of the count, Mr Chamisa dismissed the idea of making a legal challenge to the election result, saying: “that would be a slippery path. 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.”

Mr Chamisa had warned that the public would take direct action and he would not be responsible for what may follow.

"If they find that their vote has been ignored ... they did not vote for Emmerson Mnangagwa and they wil not accept him being imposed as the president. We do not control the people, they will do what they think is right,” he said.

The mood on the street was mixed between anger from those who felt the election had been hijacked and wanted action and others who were deeply apprehensive about repercussions of protests, especially after the killings two days ago.

Outside Harvest House, the MDC headquarters, crowds gathered to await instructions from party chiefs.

Goodman Panashe, 32, a polling agent in the election, had been chased and beaten by soldiers on Wednesday. Showing the weals on his arms and legs from sjamboks (leather whips), he exclaimed: “Look what they did to me, they beat people, killed people. But we must not be afraid. We have a right to protest and we shall be doing so, they cannot stop us.” His companion, Irvine Tinotenda, wanted to add: “They can try to stop us, but this time it won’t be so easy. We were with the police, who were fine, but that military unit was sent to attack us. The military took us by surprise, we are better prepared if that happens again.”

But others wanted calm. Idris Kudzai had driven to check on his electronics shop which had been locked up since Wednesday. “I am not going to open again until I know that there is safety," he said. "I am losing money now, but you cannot get compensation from insurance companies for looting. I know some people are unhappy with the elections. But we must put that aside now and move on if we want the economy to succeed.”

Meanwhile, 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 the clashes between the security forces and crowds protesting against the country’s election commission, to say that the ruling Zanu-PF party had won the parliamentary poll by a large majority.