“If you get two 18-year-olds from two different cultures and put them in New York, you get a gang fight,” said Anthony H. Cordesman, a defense expert at the Center for Strategic and International Studies in Washington who has advised the American military on its Afghan strategy.

“What you have here are two very different cultures with different values,” he said in a telephone interview. “They treat each other with contempt.”

The United States soldier was killed this month when an Afghan soldier opened fire on Americans playing volleyball at a base in the southern province of Zabul. The assailant was quickly gunned down. The deadliest single incident came last April when an Afghan Air Force colonel, Ahmed Gul, killed eight unsuspecting American officers and a contractor with shots to the head inside their headquarters.

He then killed himself after writing “God in your name” and “God is one” in blood on the walls of the base, according to an Air Force investigation of the incident released this week.

In a 436-page report, the Air Force investigators said the initial coalition explanation for the attack — stress brought on by financial problems — was only a small part of Colonel Gul’s motivation. His primary motive was hatred of the United States, and he planned the attack to kill as many Americans as possible, the investigators said.

There have been no reported instances of Americans’ killing Afghan soldiers, although a rogue group of United States soldiers killed three Afghan civilians for sport in 2010. Yet there is ample evidence of American disregard for Afghans. After the urination video circulated, a number of those who had served in Afghanistan took to Facebook and other Web sites to cheer on their compatriots, describing Afghans of all stripes in harsh terms.

Many messages were posted on public forums, others in private message strings. One private exchange was provided to The Times by a participant in the conversation; the names of those posting matched those on record as having served in the Marine Corps. In that conversation, a former Marine said he thought the video was “pretty awesome.” Another said he hoped it would happen more often.