A veteran Army soldier who helped rescue Pfc. Jessica Lynch at the beginning of the Iraq War was killed in action in Afghanistan as the U.S. effort there winds down.

Command Sgt. Maj. Martin R. Barreras, 49, of Tuscon, Ariz., died May 13 after being wounded by small arms fire a week earlier in Herat province in western Afghanistan, the Pentagon said. He was the top enlisted soldier of 2nd Battalion, 5th Infantry, 3rd Brigade Combat Team, 1st Armored Division, out of Fort Bliss, Texas.

Barreras had already been wounded in combat several times over multiple tours to both Iraq and Afghanistan.

"He could have been sitting behind a desk. Some say that's maybe where he belonged at that age. But no, Barreras was not that kind of guy. He wanted to be right there with his guys," Tuscon News Now quoted the commander of American Legion Post 132, addressing veterans there for their regular meeting.

A friend and fellow Ranger told Fox News in an email that Barreras was among those who conducted the successful rescue of Lynch from an Iraqi hospital. The friend said Barreras personally handed Lynch to another soldier to transfer her to the helicopter that evacuated her from the area.

Barreras then fended off multiple attacks in order to retrieve all 9 of the bodies of the other U.S. soldiers missing in action to bring them home, Fox News quoted the unnamed friend as saying.

“Marty never even asked for a thank you,” the friend said.