Updated

Outgoing Afghanistan President Hamid Karzai took one final swipe at the U.S. Tuesday, telling a gathering of Afghan government employees that the 13-year American-led military action had failed to bring peace to his country.

"We don't have peace because the Americans didn't want peace," said Karzai, who will officially give way to President-elect Ashraf Ghani Ahmadzai when the latter is sworn in Monday.

"If America and Pakistan really want it, peace will come to Afghanistan," Karzai added, referring to his country's eastern neighbor as well as the U.S. "The war in Afghanistan is to the benefit of foreigners. But Afghans on both sides are the sacrificial lambs and victims of this war."

Karzai also thanked a number of countries for their efforts in Afghanistan — India, Japan, China, Iran, Turkey, Saudi Arabia, South Korea and Germany — without thanking the U.S.

Karzai's words were met with a furious response by the American ambassador to Afghanistan James Cunningham, who called the comments "ungracious and ungrateful."

"It makes me kind of sad. I think his remarks, which were uncalled for, do a disservice to the American people and dishonor the huge sacrifices Americans have made here and continue to make here," Cunningham told a gathering of journalists.

Karzai's spokesman Aimal Faizi told The Washington Post that while the president appreciates the efforts of U.S. troops and taxpayers to rebuilt the war-torn country, he also believes that the U.S. did not do enough to confront Pakistan-backed militants in the country and that Washington and Islamabad "sabotaged" efforts to reach a peace deal with the Taliban.

Karzai is the only president Afghanistan has known since the 2001 U.S.-led invasion removed the Taliban from power. In the intervening years, The United States has spent more than $100 billion on aid in Afghanistan since 2001 to train and equip the country's security forces, to pave crumbling dirt roads, to upgrade hospitals and to build schools. More than 2,200 U.S. forces have died in Afghanistan operations since 2001. Nearly 20,000 have been wounded.

The United Nations says that some 8,000 Afghan civilians have been killed in the conflict over the last five years alone. Karzai for years has railed against U.S. military strikes for the civilian casualties that some of them cause — although the United Nations has said insurgents are to blame for the overwhelming majority of casualties.

In his final year in office, Karzai refused to sign a security agreement with the U.S. that would set the legal framework to allow about 10,000 American military advisers and trainers to stay in the country next year. Ghani Ahmadzai has said he will sign it.

Samehullah Samem, a member of parliament from the western province of Farah, said as a decade-long ruler Karzai has earned respect among Afghans, but that he should be more careful with his words toward an ally. He noted that the Afghan economy is faltering.

"We are completely dependent on the international community. We need the support of the international community, especially the United States of America," Samem said.

U.S. military and intelligence operatives helped transport Karzai around the region in late 2001, shortly after the September 11 attacks in New York and Washington. That U.S. connection helped pave the way to the presidency.

Ghani Ahmadzai's entrance is more conventional. A former finance minister, the new president has worked at the World Bank and earned a PhD. from New York's Colombia University. His path to the presidency follows a long election season that ended with negotiations for a national unity government and the election commission giving him 55 percent of the runoff vote.

Cunningham said the U.S. was asked to be involved in the unity negotiations and that the U.S. exerted itself to help Afghanistan succeed, an important achievement especially given the "psychic investment as well as blood and treasure" here since 2001.

The 13-year war against the Taliban has largely been turned over to Afghan security forces, a development that has seen casualties among Afghan soldiers rise significantly this year.

The Associated Press contributed to this report. 

Click for more from The Washington Post.