"I find occasional comments from some of your leaders hurtful and inappropriate," Mr. Eikenberry told the crowd according to a transcript of the speech on Sunday.

The U.S. ambassador to Afghanistan has publicly reproached President Hamid Karzai for painting American forces here as occupiers and enemies - one of the strongest signs yet that international allies are no longer willing to excuse his harangues as harmless domestic politicking.

U.S. Ambassador Karl Eikenberry told university students and faculty in the western city of Herat that he felt the need to speak from his heart as he reaches the end of his two—year tour as ambassador. The words that came next were strongly critical of the Afghan president, without naming Mr. Karzai.

“I find occasional comments from some of your leaders hurtful and inappropriate,” Mr. Eikenberry told the crowd according to a transcript of the speech on Sunday.

In recent speeches, Mr. Karzai has said the U.S. is in danger of becoming an occupying force, threatened to take unspecified “unilateral action” against international forces that conduct air strikes and accused international allies of undermining and corrupting his government.

The U.S. envoy hit back hard.

“When Americans, who are serving in your country at great cost in terms of lives and treasure, hear themselves compared with occupiers, told that they are only here to advance their own interest, and likened to the brutal enemies of the Afghan people ... they are filled with confusion and grow weary of our effort here,” Mr. Eikenberry said. “Mothers and fathers of fallen soldiers, spouses of soldiers who have lost arms and legs, children of those who lost their lives in your country - they ask themselves about the meaning of their loved one’s sacrifice.”

Mr. Eikenberry’s tour as ambassador has been strained by his tense relationship with Mr. Karzai. In a classified memo in 2009, Mr. Eikenberry said that Mr. Karzai was not a reliable partner with whom to rebuild Afghanistan. The memo was leaked to the press, and Mr. Eikenberry has spent the time since trying to repair the fractured relationship. He has repeatedly insisted that he and Mr. Karzai work well and comfortably together.

Now, as he prepares to hand over the post to Ryan Crocker, Mr. Eikenberry appears to have decided to speak more candidly.

“When we hear ourselves being called occupiers and worse, our pride is offended, and we begin to lose our inspiration to carry on,” Mr. Eikenberry said.

His words were especially ominous, coming just a month before the beginning of a scheduled drawdown of American troops. President Barack Obama has pledged to start bringing some soldiers home in July but has not yet announced how many.

Key to any drawdown is the success of plans to gradually transfer oversight of Afghan cities and towns to national security forces. Mr. Karzai has said that seven areas will transfer to Afghan control in July, at the same time that the first draw-downs begin.

Some of the very areas slated to transition have been struck by high—profile attacks in recent weeks. Herat city was struck by Taliban insurgents last month and Kabul was hit on Saturday by militants dressed in Afghan army uniforms who charged a police station and killed nine people before they were gunned down.

In the latest violence, a suicide attacker in northern Kunduz province blew up his explosives—laden car next to a German military convoy in northern Afghanistan on Sunday, killing three Afghan civilians, officials and witnesses said.

Taliban claimed responsibility for the attack, said Taliban spokesman Zabiullah Mujahid

The violence continues despite assertions by Mr. Karzai that fledgling peace talks have started between the U.S. and Afghan government and Taliban emissaries. Reports about such talks have surfaced in recent months, but Mr. Karzai’s statement on Saturday was the first public confirmation of U.S. participation. Publicly, the Taliban say there will be no negotiations until foreign troops leave Afghanistan.

The White House has neither directly confirmed or denied Mr. Karzai’s statements.

On Sunday, Pentagon chief Robert Gates said he didn’t believe the Taliban would engage in serious talks about ending their fight until they are under extreme military pressure. Mr. Gates acknowledged that “there’s been outreach” to the Taliban by the U.S. and others, but he describes the contacts as “very preliminary at this point.”

Such talks may be gaining momentum after the U.N. Security Council voted unanimously on Friday to treat al—Qaeda and the Taliban separately when it comes to U.N. sanctions, a move aimed at supporting the Afghan government’s reconciliation efforts.

More In: International | News