KABUL, Afghanistan — Taliban suicide bombers struck NATO fuel trucks at a key border crossing between Afghanistan and Pakistan Thursday, setting off explosions that destroyed dozens of trucks and triggering a gunbattle with police guards that left all three attackers dead, officials said.

The attack underscored the instability plaguing the country and the continuing danger to the U.S.-led mission in Afghanistan as combat forces prepare to withdraw by the end of this year.

Western officials had hoped a peaceful transfer of authority to a new president in democratic elections would help ease the transition, but instead allegations of massive fraud in the June 14 runoff vote have plunged the country into a new political crisis.

Abdullah Abdullah, who is running against Ashraf Ghani Ahmadzai, said Thursday that the Independent Electoral Commission had ignored his call to stop the ballot counting and other demands so he will not resume cooperation with the panel or its affiliated complaints commission.

"We will not consider those two institutions as legitimate from now onwards, because of their disregard of the legitimate demands of us on behalf of millions of people of Afghanistan," he said at a news conference.

Abdullah acknowledged concerns the crisis could further destabilize the country but said the responsibility for that ultimately lies with the commissions, which were appointed by outgoing President Hamid Karzai. Abdullah's comments come as he is fighting for his second chance at the presidency. He was the runner-up to Karzai in disputed 2009 elections, but he dropped out of the race before a runoff could be held because of widespread vote-rigging.

Abdullah, a former foreign minister who won the first round on April 5 but failed to gain the majority needed to avoid a runoff, said his campaign monitors had recorded ballot box stuffing and other irregularities. He announced Wednesday that he was suspending cooperation with the electoral commissions and demanded that the head of the IEC's chief officer Zia ul-Haq Amarkhail be suspended for alleged ballot tampering. IEC spokesman Noor Mohammad Noor said Wednesday an investigation had been carried out on the issue and the case was being decided by the complaints commission.

Preliminary results are not due until July 2, followed by final results on July 22, according to the official timetable. Electoral officials have said they would release partial results before that but have not yet done so.

The winner will replace Karzai, the only leader the country has known since the 2001 U.S.-led invasion that ousted the Taliban. He was constitutionally barred from seeking a third term.

Ahmadzai, a former finance minister and World Bank official, has not publicly spoken on Abdullah's announcement, but his spokesmen have said it was a violation of a code of conduct signed by both candidates who agreed to cooperate with the electoral commissions. His campaign has joined the international community in urging patience and respect for the process.

The Obama administration is watching carefully, eager to show progress in the country and get a security agreement signed after announcing it would leave 9,800 U.S. troops in Afghanistan at the end of this year to continue training the Afghans and conduct counterterrorism missions. That number would be cut in half by the end of 2015, and most of the remainder would leave by the end of 2016.

In Washington, at a Senate hearing on Afghanistan on Wednesday, the U.S. special representative for Afghanistan and Pakistan James Dobbins counseled patience in light of the controversy over the second-round vote, saying it would be several weeks before the outcome would be clear.

Dobbins said U.S. officials were in contact with both campaigns, the election commissions and Karzai, who has been "trying to keep the candidates in the game."

Dobbins said there was "significant" fraud in the first round of voting and "almost certainly" in the second round. But, he added that mechanisms for challenging and dealing with the fraud "have to be given a chance to work."

Taliban spokesman Zabihullah Mujahid claimed responsibility for the attack in the eastern Afghan province of Nangarhar, which a border police spokesman Idris Momand said began before dawn and left 37 NATO trucks destroyed in explosions set off by a gunbattle between the militants and the guards.

All three Taliban bombers, who targeted a parking lot of the NATO outpost near the Torkham border crossing, were killed. Most NATO cargo shipments go through the Torkham crossing, toward Pakistan's port city of Karachi.

Associated Press writer Deb Riechmann in Washington contributed to this report.