The United States warned on Tuesday it would withdraw financial and security support from Afghanistan if anyone tried to take power illegally, as supporters of a presidential candidate rallied in Kabul for a parallel government.

Preliminary results announced on Monday showed that Ashraf Ghani, a former World Bank official, won the June 14 second round, but his rival Abdullah Abdullah immediately rejected the outcome, saying the vote was marred by widespread fraud.

Underscoring the magnitude of the crisis, Abdullah said US Secretary of State John Kerry would visit Kabul on Friday. Kerry arrived in Beijing on Tuesday for the annual Strategic and Economic Dialogue. The US-China talks finish on Thursday.

Thousands of Abdullah supporters gathered in the capital Kabul on Tuesday, demanding their leader form a parallel cabinet and unilaterally assert his own rule - a dangerous move that would further fracture the fragile country.

In a sharp warning, Kerry said there was no justification for violence or “extra-constitutional measures”.

“I have noted reports of protests in Afghanistan and of suggestions of a ‘parallel government’ with the gravest concern,” he said in a statement issued by the US embassy in Kabul.

“Any action to take power by extra-legal means will cost Afghanistan the financial and security support of the United States and the international community.” Afghanistan is heavily reliant on foreign donors to fund everything from building roads and paying school teachers to security. The United States pays the lion’s share of all international aid.

Observers fear that a standoff between Abdullah and Ghani could plunge Afghanistan into disorder, with no clear leader in a country already beset by deep-rooted ethnic divisions.

Abdullah has accused President Hamid Karzai, who is stepping down after 12 years in power, of helping rig the vote in favour of Ghani, describing it as a “coup” against the people.

The standoff over the vote has quashed hopes for a smooth transition of power in Afghanistan, a concern for the West as most US-led forces withdraw from the country this year.

There are concerns however about how much Abdullah, who is popular among the powerful Tajik community in the north, would be able to control his supporters if the crisis escalated.

Thousands of his supporters vented their anger in Kabul on Tuesday, chanting “Death to Karzai”, tearing down a large portrait of the outgoing leader and replacing it with an image of Abdullah.

At the rally, Abdullah, visibly flustered by the size of the gathering, faced a roar of slogans demanding he immediately announce his own cabinet, telling supporters to be patient.

“We are the winner of this round of elections without any doubt,” he told the flag-waving and whistling crowd.

“We are proud, we respect the votes of the people, we were the winner,” Abdullah said. “Without any doubt or hesitation, we will not accept a fraudulent result, not today, not tomorrow, never.”

“The people of Afghanistan call on me to announce my government today. This was and is a demand from the people of Afghanistan... We cannot ignore this call. ... Once again I ask you to give me a few days to consult and speak.”

The apparent softening of his tone comes after speaking with by telephone with Kerry and US President Barack Obama. “The main point in both US Secretary of State’s and the President’s discussions was that John Kerry will come to Afghanistan on Friday and their promise was that they will be next to the people of Afghanistan in defending justice, fighting against fraud and revealing fraud,” Abdullah said. US officials were not immediately available for comment.

Away from the city’s centre, Abdullah supporters also tore down another Karzai portrait at Kabul’s international airport.

Ghani, who is backed mainly by Pashtun tribes in the south and east of the country, sought to appear conciliatory on Tuesday, talking at length about Afghanistan’s unity and of his respect for Abdullah.

“His Excellency Dr Abdullah is a national figure, a respected figure so he wouldn’t lead to a parallel government,” he told reporters.

“We have backed all Abdullah’s demands to recount and audit suspicious votes for the sake of transparency... They have asked for the inspection of votes so they should rejoin the process.”

The election stand-off has sparked concern that protests could spiral into ethnic violence and even lead to a return to the fighting between warlords that ravaged Afghanistan during the 1992-1996 civil war. But Abdullah called for the country to remain unified as it faces a difficult transfer of power, after Karzai’s 13-year rule ends and as 50,000 US-led troops wind down their battle against Taliban insurgents.

“We don’t want partition of Afghanistan, we want to preserve national unity and the dignity of Afghanistan,” he said. “We don’t want civil war. We want stability, not division.” In the eight-man first-round election on April 5, Abdullah was far ahead with 45 percent against Ghani’s 31.6 percent.

Karzai, who is constitutionally barred from a third term in office, has stayed publicly neutral in the lengthy election, but Abdullah supporters accuse him of fixing the vote in Ghani’s favour.

Turnout on June 14 was more than eight million out of an estimated electorate of 13.5 million, far higher than expected - fuelling fierce arguments about fraud from both sides.

Independent Election Commission head Ahmad Yusuf Nuristani announced the results of the run-off vote on Monday, admitting there had been fraud by the security forces and senior government officials.

Nuristani emphasised that the results would now be subject to auditing and adjudication of complaints, before the official result is released on about July 24.

“The preliminary result in no way means the announcement of the winner of the election,” Nuristani said. “A change in the result is possible.”