A retired soldier who was shot in the head while searching for US Army deserter Bowe Bergdahl in Afghanistan a decade ago has died of complications from the injury, according to reports.

Master Sgt. Mark Allen, of Loganville, Georgia, was severely wounded in 2009 when he and other troops looked for Bergdahl, an Army private who deserted his post and was captured by the Taliban.

Allen, who died Saturday at age 46, was shot during an insurgent ambush in 2009, when he was left paralyzed over much of his body and unable to speak after suffering a traumatic brain injury.

His wife, Shannon Allen, has told WSB Radio that she did not learn about the circumstances surrounding her husband’s injuries until 2014, after former President Barack Obama negotiated Bergdahl’s release in a swap for five Taliban members held at Guantanamo Bay.

“I’m heartbroken to let you all know that my husband passed away peacefully yesterday morning with his family by his side,” Shannon Allen said in a Facebook post.

“Over ten years ago, he sustained a severe head injury while serving in Afghanistan, which caused him lifelong health problems. These past few months, he has faced some significant illnesses, and his body was finally ready to rest.”

In 2017, she testified at Bergdahl’s sentencing hearing at Fort Bragg, North Carolina, saying her husband had undergone about 20 surgeries and required nursing care 24 hours a day.

“He is present, makes eye contact,” she told the court, according to CNN. “He can laugh, smile, cry. That is the extent of the communication.”

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

Bergdahl, 33, who was a sergeant when he left his post in Afghanistan, had faced up to life in prison for his desertion.

He was reduced in rank to private, ordered to forfeit $1,000 in pay for 10 months, and given a dishonorable discharge. He did not serve any prison time.

During the trial, he apologized to those injured during the search.

“I would like everyone who searched for me to know it was never my intention for anyone to be hurt, and I never expected that to happen,” he said in January 2016.

Allen’s funeral is scheduled for Friday.