Updated

An Army Ranger who helped rescue former POW Jessica Lynch from an Iraqi hospital in 2003 has died after being shot in Afghanistan, the Defense Department announced Thursday.

The Pentagon said in a statement that Command Sgt. Maj. Martin R. Barreras, 49, died May 13 in Texas after suffering injuries in Afghanistan on May 6.

Barreras, known as “Gunny,” was the top enlisted soldier for a unit based in Fort Bliss, Texas at the time of his death, according to the Army Times. He joined the Army in 1988 after serving five years in the Marine Corps.

WATCH: Army Ranger who helped rescue Jessia Lynch dies

The Army Times reports Barreras served 22 years in the Army’s 75th Ranger Regiment. In that time he served multiple tours in Iraq and Afghanistan and also deployed to Panama and Haiti.

A friend and fellow Ranger said in an email to Fox News that Barreras was a member of the Army battalion that 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, according to the friend, 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.

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

Barreras, who was originally from Arizona, is survived by his wife, two daughters and son, according to the Army Times.

Fox News' Jennifer Griffin contributed to this report