The US ambassador to Afghanistan, John Pace, has violated President Ashraf Ghani for calling the US aid agency "incompetent" in an escalation of tensions over financial support on the eve of an Afghan election.

"We are angry that President Ashraf Ghani has overlooked the excellent work of the US Agency for International Development," US Ambassador John Bass said in his official Twitter account. The ambassador then listed a series of projects implemented by the agency, including helping women start their own projects, training midwives and improving power plants in the country.

The Afghan president criticized the US Agency for International Development (USAID) in an interview with Afghan Radio Azadi on Wednesday for not getting funds to help the Afghan people and failing to enforce regulations.

"For every dollar, the Afghan people don't get more than a dime," he said. "USAID is one of the inefficient donors," he said.

USAID has been working in Afghanistan since 2002.

Foreign aid still accounts for more than half of Afghanistan's budget, but donors are skeptical of its effectiveness and most funding pledges are valid until 2020.

Last week, the United States said it would withdraw about $ 100 million for an energy infrastructure project in Afghanistan and withheld $ 60 million in other aid, saying it was due to corruption and a lack of transparency in the country.

It is unclear whether Ghani's comments relate to this US move.

President Ashraf Ghani's comments could undermine goodwill between his country and donors as Ghani seeks re-election on Saturday, saying he is seeking more self-reliance and criticizing the United States and Pakistan.

Relations were also complicated by US President Donald Trump's sudden decision to cancel talks with the Taliban aimed at ending the country's 18-year war.