Command Sgt. Maj. Martin R. Barras, who helped in the rescue of former POW Jessica Lynch, has died after he was shot in Afghanistan earlier this month.

The Defense Department announced his death on Thursday, reports The Army Times. The 49-year-old from Tuscon, Arizona died on Tuesday at the San Antonio Medical Center.

Barreras was shot in the Herat province of Afghanistan on May 6, according to the Pentagon. He was a member of the 3rd Brigade Combat Team, 1st Armored Division at Fort Bliss, Texas.

“Command Sgt. Maj. Barreras was my friend and battle buddy,” said Lt. Col. Edward Brady, the battalion commander, in a statement. He later added, “While every soldier in this formation is extremely saddened by his loss, his Bobcats are doing exactly what he would expect of us: continuing on with the mission and taking the fight to the enemy. This man would do absolutely anything and everything to ensure his soldiers came home safely.”

Berreras had been a member of the Army since 1988 and served 22 years in the 75th Ranger Regiment. He served in both Afghanistan and Iraq, as well as missions in Panama and Haiti.

A fellow Ranger confirmed to Fox News that Berraras did lead the battalion that helped rescue Lynch in Iraq. He personally handed Lynch to a soldier that took her to a helicopter, according to the friend.

He earned several awards during his service and is survived by his wife, three children and three grandchildren. He is also survived by his parents and two brothers.