LITTLE ROCK, Ark.  A 23-year-old man upset about the wars in Iraq and Afghanistan opened fire from his truck at two soldiers standing outside a military recruiting station here on Monday morning, killing one private and wounding another, the police said.

The gunman, identified by the police as Abdulhakim Mujahid Muhammad of Little Rock, fled the scene and was arrested minutes later a short distance from the recruiting station, in a bustling suburban shopping center. The police confiscated a Russian-made SKS semiautomatic rifle, a .22-caliber rifle and a handgun from his black pickup truck.

The two privates, who were both from Arkansas, were in Little Rock as part of a recruiting program that typically uses soldiers recently out of basic training to promote the Army in their home regions, Army officials said.

“They were serving their country,” said Lt. Col. Thomas F. Artis, commander of the Oklahoma City recruiting battalion, which includes Arkansas. “They were just standing outside, just taking a five-minute break, just minding their own business  and this happens.”