KABUL, Afghanistan — An American soldier would have been well served to remember the childhood adage about sticks and stones before he threw rocks at a wall-size portrait of President Hamid Karzai that graces a town square in northeastern Afghanistan.

If only he had used his words.

Fortunately, at a time of growing tension between Afghans and Americans, the only thing the soldier seems to have bruised was his career. He was pulled from the front line after residents saw the rock-throwing and complained about the disrespect shown their president, according to an Afghan official and the American-led military coalition.

In the annals of American missteps in Afghanistan, the case of the stone-throwing soldier ranks far below Marines’ urinating on the corpses of Taliban fighters, the accidental burning of Korans and other episodes that have offended and enraged the Afghan public over the past dozen years.

But it does offer a reminder that patience on both sides is wearing thin as the war grinds on, and that thoughtless acts can lead to international incidents. This one, at least, appears to have been quickly contained.