NEW DELHI: A deal to form a national unity government has been signed by Abdullah Abdullah and Ashraf Ghani, bringing to a close months of wrangling following the Afghan presidential elections in April.

As per the deal, Ghani will be Afghanistan’s new president whilst Abdullah assumes a secondary role with powers similar to those of a prime minister.

The signing of the deal comes a few weeks after Abdullah had pulled out of the race, raising allegations of fraud and stating that his camp would not recognise the results of an internationally monitored audit.

The threat to pull out came as the process of invalidating fraudulent votes began. Abdullah’s key demand was that ballot boxes with 90 per cent votes for one candidate be invalidated. “The invalidation process is just a joke and there is no intention of throwing out fraudulent votes," Fazel Ahmad Manawi, Abdullah's chief auditor, told reporters in Kabul, according to Reuters.

The unity deal had been agreed to by both candidates months ago, brokered by US Secretary of State John Kerry, but had been beset with complications from the start.

Abdullah, who won the first round of the elections, has repeatedly asserted that the run-off was rigged to benefit Ghani, with the preliminary results of the second round showing the latter in the lead. Although the two sides agreed to an audit of the 8 million votes cast, the process has been fraught with delays. Most recently, supporters of candidate Abdullah Abdullah released an audio recording supposedly implicating Vice President Mohammad Karim Khalili, who was said to be encouraging vote-rigging in favour of rival candidate Ashraf Ghani.

Khalili and Ghani dismissed the recordings as fake. "The audio is completely fake ... Khalili does not speak like that," Abbas Basir, chief of staff for Khalili was quoted as saying, adding that “our rival team is resorting to such an act because they are under immense pressure.”

The recording had been released just as Abdullah’s campaign agreed to rejoin the auditing process, that restarted on Sunday after a week long delay. The agreement on the audit had been brokered by Kerry and head of the United Nations Assistance Mission in Afghanistan, Ján Kubiš, after Abdullah boycotted the preliminary results of the presidential run-off and threatened to form a parallel government.

The audit involves recounting of 8 million votes cast in the second round of the presidential elections, in the presence of international observers. Prior to the audit, initial results had shown that Ghani received 56 percent and Abdullah 43 percent of 8 million votes, which are up by more than 20 percent of voters from the first round of elections in April. The turnout itself is a measure of dispute regarding fraud, with Abdullah alleging the stuffing of ballot boxes with fraudulent votes and Ghani’s camp attributing it to more robust mobilization.

The first round of elections concluded with Abdullah in the lead with 45 percent of the 6.5 million votes cast and Ghani in second place with 31.6 percent. Afghan election procedures mandate that the winning candidate must secure over 50 percent of the vote in the first round, failing which, the elections go into a second round.

The run off was a gamble for both candidates, with Abdullah needing to augment the 45 percent votes cast in his favour by an additional 400,000 votes to win the run-off, whereas Ghani needed an extra one million votes - i.e., all the votes of Zalmai Rassoul who placed third with 11.5 percent and Professor Sayyaf, who came in fourth with 7.1 percent of the vote.

The preliminary results indicate that Ghani managed this extraordinary feat, with a huge surge in voters between the two rounds of elections. In central Wardak, Ghani’s votes increased by ten times; in southern Kandahar by six times; in other provinces his votes tripled and quadrupled. With Abdullah crying foul, Ghani’s camp attributed the increase to mobilisation efforts directed at clerics and in convincing conservative Pashtun voters to allow women in the family to vote for the first time.

Spokesperson for the Abdullah camp, Fazl Rahman Orya, dismissed the announcement of the preliminary results saying that the figures “hold no credibility.” Abdullah had earlier made a statement indicating that he would not be accepting the results, saying, “we will not accept the preliminary results until clean votes are separated from fraudulent votes… The international community wants a government based on legitimate votes.”

The results were postponed following allegations of fraud raised by Abdullah, who claimed that the system was rigged to favour Ghani, directly implicating current President Karzai in the claim. Abdullah had in turn, had welcomed the decision to delay the announcement of results, saying it will allow time for an audit into the “industrial scale” fraud that has plagued the second round of the elections. “Now there is a time, there is a space, because of the delay,” Abdullah said in an interview with AFP in Kabul. “We are talking about measures that would be more robust, vigorous auditing, that would take care of the fraudulent ballot papers... Almost everybody now agrees there has been industrial-scale fraud... The outcome will not be considered legitimate if that is not being taken care of,” said Abdullah whose supporters had taken to the streets to protest against the fraud, prompting the United Nations to issue a statement of concern regarding civil unrest.

Abdullah said that a number of his observers had been beaten up and detained, being released only after counting on Tuesday. Abdullah additionally complained that there has been no explanation offered regarding what he termed as inflated voter turnout, nor any explanation for the sacking of several thousand election workers after the first round of the Afghan elections which had placed Abdullah in the lead.

Pinning the blame directly on Karzai, Abdullah stated that “everybody knows that unfortunately the president of Afghanistan was not impartial” and that ballot boxes had been stuffed with votes a day before the second-round election.

"We suspend engagement with the [election] commission and we have asked our monitors to leave their offices," declared Abdullah. "The counting process should stop immediately and if that continues, it will have no legitimacy," he added, as although the votes are yet to be counted, preliminary reports and estimations received by Abdullah’s staff indicate Ghani in the lead with nearly a million votes.

The allegations led to the resignation of Independent Election Commission (IEC) Secretariat head Zia-ul-Haq Amarkhil, who Abdullah accused of fraud having aired what appeared to be intercepted phone conversations in which Amarkhil asked officials to stuff ballot boxes. Amarkhil denied the allegation but submitted his resignation following the airing of the conversation. "That was a fake and made-up tape to confuse public opinion," Amarkhil told reporters, adding "I believe in elections and I believe in justice and I believe in democracy."