But Barack Obama, the US president, has emphasised that the change in commander will not mean a change in strategy in the nearly nine-year-old war.

Petraeus praised McChrystal for his "vision, energy and leadership".

"Up front, I also want to recognise the enormous contributions of my predecessor," he said.

Petraeus has also endorsed Obama's plan to begin withdrawing US troops in July of 2011.

US officials have not said how many troops they plan to withdraw, however, and analysts say it will be difficult for Petraeus to show substantial progress before that deadline.

"Time is short. Petraeus has just 12 months to meet the deadline Obama set before withdrawal," Akmal Dawi, with the Kabul-based Afghanistan Rights Monitor, said.

"The challenges are huge."

"Unity, accountability and transparency"

Petraeus met on Saturday with Hamid Karzai, the Afghan president. The two men discussed efforts to improve governance and stamp out corruption, according to a statement from Karzai's office.

Petraeus said he wanted to emphasise "unity, accountability and transparency".

Karzai also complained about allegations from Nita Lowey, a US congresswoman, who accused Afghan officials of stealing millions of dollars in foreign aid. He called the accusations "baseless."

Lowey recently blocked a $3.9bn aid package, saying the money would be released after Karzai's government moves to stop corruption.

Petraeus also met with Afghan and Nato officials on Saturday at a US independence day celebration at the US embassy in Kabul.

"This is an effort in which we must achieve unity of effort and common purpose," he said at the celebration.