The United States on Thursday accused Afghanistan's government of failing to fight corruption and cut more than $160 million in direct funding, little over a week before the country's elections.

While Washington has long complained of graft by its ally, the harsh measure comes after Afghan President Ashraf Ghani clashed with President Donald Trump over the US leader's deal with the Taliban.

"We stand against those who exploit their positions of power and influence to deprive the Afghan people of the benefits of foreign assistance and a more prosperous future," Secretary of State Mike Pompeo said in a statement.

Pompeo said that the United States was suspending work with the Afghan body in charge of monitoring corruption as it is "incapable of being a partner."

"We expect the Afghan government to demonstrate a clear commitment to fight corruption, to serve the Afghan people and to maintain their trust," he said.

"Afghan leaders who fail to meet this standard should be held accountable."

Pompeo said the United States was taking back $100 million committed for a major energy project, saying that Washington would fund it directly rather than sending the money through Afghan authorities.

He also said the United States would withhold $60 million in planned assistance to Afghanistan's procurement authority.

Urging 'free and fair' elections

Ghani stands for re-election on September 28 in the campaign already marred by Taliban violence, with dozens killed this week including in an attack on a Ghani rally.

The last election, in 2014, ended in allegations of rigging and a political stalemate between Ghani and Abdullah Abdullah, who is again running.

They eventually reached a power-sharing arrangement after brokering by then US secretary of state John Kerry.

Pompeo, speaking to reporters in Abu Dhabi, said that the United States wanted "free and fair elections," adding: "We're going to do everything we can to support them."

Trump had sought to seal a deal with the Taliban before the Afghan election as part of his goal of ending America's longest war, launched after the September 11, 2001 attacks.

Ghani had voiced strong concern over a draft deal, under which the United States would have withdrawn thousands of troops despite the Taliban's refusal to negotiate with the internationally recognized government.

Trump, who had controversially invited both the Taliban and Ghani to the United States, eventually declared the talks dead, citing an attack by the insurgents that killed a US soldier.

Alice Wells, the assistant secretary of state for South and Central Asia, told Congress in a hearing Thursday that the negotiations were "suspended."

Representative Eliot Engel, the Democrat who heads the House Foreign Affairs Committee, worried that the Trump administration had no clear policy going forward.

"With the president declaring the deal dead, it's not clear where we go from here," he said.

Engel had summoned the US negotiator with the Taliban, Zalmay Khalilzad, to testify at the hearing but withdrew his subpoena after the veteran diplomat agreed to speak to lawmakers behind closed doors.

Former president Barack Obama also clashed with his Afghan counterpart, Hamid Karzai, with his administration saying Kabul had not curbed corruption and became too reliant on the US military.

Under Ghani, a longtime US resident and professor of anthropology of Johns Hopkins University, US officials have credited Afghan troops with taking the lead in fighting the Taliban.

Wells said that the United States still had myriad concerns with the direction of Afghanistan along with corruption, including opium production and "criminalization of the economy."