A soldier who was gravely wounded while searching for Bowe Bergdahl in 2009 has died, 10 years after his unit was ambushed in Afghanistan.

National Guard Master Sgt. Mark Allen was on a mission to gather information in two Afghan villages in July 2009 when his unit was ambushed by insurgents using small arms, machine guns and rocket-propelled grenades.

During the ambush Allen was shot in the head and suffered a traumatic brain injury. He was left unable to speak and using a wheelchair, his wife Shannon Allen testified in 2017 during Bergdahl's sentencing hearing on a desertion charge.

I’m heartbroken to let you all know that my husband passed away peacefully yesterday morning, with his family by his... Posted by Wreaths by Shannon on Sunday, October 13, 2019

Bergdahl was captured by the Taliban after walking away from his post and was held for five years before being released in a prisoner swap in 2014. He was dishonorably discharged but sentenced to no prison time for endangering his fellow soldiers.

Get Breaking News Delivered to Your Inbox

A decade after Allen was wounded in the ambush, Allen's wife posted a message on her business Facebook account announcing the death of her husband.

"I'm heartbroken to let you all know that my husband passed away peacefully yesterday morning, with his family by his side," she wrote. "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."

She said she would be unable to respond to messages at this time.

The Walton Tribune, a local newspaper for the Georgia county Allen was from, posted an obituary about the father of two. It said he served in the Army and National Guard for 21 years and received a Purple Heart upon his retirement in 2013.

After suffering his life-changing injury, Allen's community rallied behind his family, with volunteers building a playground for his young daughter. Inspired by Allen, the community also bought adaptive jackets for other wounded soldiers, the Walton Tribune reports.