Afghan President Hamid Karzai has held talks with US President George W Bush in Washington about the fight against the resurgent Taleban in his country.
The two leaders stressed their commitment to work together
Mr Bush reaffirmed his commitment, along with other countries, to help establish security and rebuild the economy in Afghanistan.
He said Mr Karzai had a tough job, and that he was proud to call him an ally.
He said tactics were changing to meet the recent upsurge in violence. "We've gone on the offensive," he said.
Mr Bush's comments came as it was announced that a four-star general - the most senior rank in the US army - is to take over control of the 40,000 Nato and American troops in Afghanistan.
Subject to US Senate approval, Gen Dan McNeil will take over command of Nato's International Security Assistance Force and the separate US-led coalition force.
Mr Bush told Mr Karzai: "I know there are some in your country who wonder whether or not America has got the will to do the hard work necessary to help you succeed. We have got that will."
On Wednesday, President Bush will host a dinner for President Karzai and the Pakistani President, Pervez Musharraf, to address security issues in the region.
Mr Bush said that his discussions with both leaders led him to believe that they were both committed to working together to "achieve a common objective".
Over recent months, President Karzai has suggested that Pakistan has turned a blind eye to Taleban supporters using parts of the country to train and launch attacks on Afghanistan - claims Pakistan vehemently denies.
Gen Musharraf says the problem lies in Afghanistan
Monday saw Mr Musharraf counter by saying Afghanistan itself was not doing enough to battle extremism.
"As soon as President Karzai understands his own country, the easier it'll be for him," he said in an address to the Council for Foreign Relations think-tank in New York.
Last week, Mr Karzai appealed to the United Nations General Assembly for more to be done to track down Taleban militants outside Afghanistan's borders.
Gen Musharraf denied allegations that Taleban leaders had set up a base near the city of Quetta in the province of Balochistan.
Mr Karzai has also been particularly critical of a peace deal between the Pakistani army and tribal elders in North Waziristan.
He says that violence in Afghanistan has increased since the deal.
Gen Musharraf said the deal had been struck in order to fight the Taleban, not to have dealings with them.