LOGANVILLE, Ga. — A retired soldier who was shot in the head while searching for Army Pvt. Bowe Bergdahl in Afghanistan has died.

Master Sgt. Mark Allen, 46, of Loganville, Georgia, died Saturday, the Atlanta Journal-Constitution reported. His obituary said he died from complications of an injury sustained while serving in Afghanistan.

Allen was shot during an insurgent ambush in 2009, and was left unable to speak and paralyzed over much of his body. An official cause of death wasn't released.

Sgt. Mark Allen. U.S. Army

Allen spent 21 years in the Army and the Army National Guard. He retired upon receiving a Purple Heart in 2013.

Bergdahl disappeared when he reportedly walked away from a U.S. military base in eastern Afghanistan in June 2009, carrying only a compass and a bottle of water. He was the only U.S. service member ever to be held captive by enemy forces in Afghanistan.

After his unexpected release in 2014, Bergdahl was spared prison time for abandoning his post and endangering military comrades who participated in the lengthy search for him.

Allen was seriously injured in the search for Bergdahl. Allen's wife, Shannon Allen, gave a heart-wrenching testimony nearly two years ago during Bergdahl's sentencing hearing about her husband's state.

"He's lost me as a wife, essentially, because instead of being his wife, I'm his caregiver," Shannon Allen told a military court. "I mean, we can't hold hands anymore, unless I pry open his hand and place mine in it."

Sharon Allen said that her husband was "always happy-go-lucky" before he was wounded. They had a son, Cody, and a daughter, Journey.