KABUL  - The Afghan president is angry at being kept in the dark over a deal to free five Taliban leaders in exchange for a captured US soldier, and accuses Washington of failing to back a peace plan for the war-torn country, a senior source said on Monday.

The five prisoners were flown to Qatar on Sunday as part of a secret agreement to release Army Sergeant Bowe Bergdahl, who left Afghanistan for Germany on the same day.

The only known US prisoner of war in Afghanistan, Bergdahl had been held captive for five years. "The president is now even more distrustful of US intentions in the country," said the source at President Hamid Karzai's palace in Kabul, who declined to be identified. "He is asking: How come the prisoner exchange worked out so well, when the Afghan peace process failed to make any significant progress?"

"It won't help the peace process in any way, because we don't believe in the peace process," Taliban spokesman Zabihullah Mujahid said on Sunday.

The palace official also said Karzai was worried about further deals being cut without his knowledge. "It indicates that other deals could be negotiated behind the president's back," he said.

The White House on Monday defended the release of five Guantanamo detainees in exchange for a US soldier held by the Taliban, saying a potential threat had been "sufficiently mitigated."

White House Press Secretary Jay Carney took to the US morning talk shows to downplay the threat posed by the men - influential former officials of the Taliban regime that was toppled by the US-led invasion of Afghanistan.

"We have a history in this country of making sure that our prisoners of war are returned to us, we don't leave them behind," Carney told CNN.

Meanwhile, Taliban insurgents threatened Monday to attack Afghanistan's run-off presidential election, warning voters to stay away from polling stations for fear of injury or death.

Afghans are due to go to the polls on June 14 to choose whether Ashraf Ghani or Abdullah Abdullah should succeed President Hamid Karzai.

The militants, ousted from power in Kabul by a 2001 US-led invasion, threatened to attack the first round of voting on April 5 but the day passed off with a high turnout and no major security incidents.

In a statement in English on their website, the Taliban said their fighters "are once again fully prepared to operate against the workers and polling stations in the second phase of these counterfeit elections". "Therefore, you (the masses) should remain far away from the polling stations on 14th June, 2014, lest you should be hurt or killed." On Friday Ghani, a former World Bank economist, said if elected he would put his name to a long-delayed security pact with the United States that Karzai has refused to sign. Abdullah has also said he would sign.

Ghani's pledge came only days after US President Barack Obama said the 32,000 American forces in Afghanistan will be scaled back to 9,800 by early 2015 and complete a full withdrawal by the end of 2016.

Ghani faces an uphill task after finishing second with 31.6 percent - behind Abdullah with 45 percent - in the eight-candidate first round.

The Taliban last week denounced US plans to keep troops in Afghanistan until the end of 2016, threatening to wage war against the "occupation" until the very last foreign soldier pulls out.

The militants' statement Monday quoted scripture to urge people to shun the poll, and poured scorn on the "cruel, corrupt" candidates and their Western backers.

A US general warned Saturday that the Taliban would redouble efforts to disrupt the second-round vote.

"I think the enemy is going to make a push on run-off day," said Major General Stephen Townsend, commander of NATO-led forces in eastern Afghanistan.

On Saturday the Taliban freed the only US soldier in their custody, Sergeant Bowe Bergdahl, in exchange for five of their own senior figures held at Guantanamo Bay.

The swap has ignited a political row in the United States but also raised hopes for peace as the US prepares to leave Afghanistan.

Washington has defended the swap as critical to saving Bergdahl's life after five years in captivity but Republican lawmakers criticised it, saying the freed Taliban could still pose a threat to Americans.

Mullah Mohammad Omar, the spiritual leader of the Taliban, issued a rare statement praising the release of the Guantanamo five as a "big victory".