Capt. Derek Herrera wanted to remain on active duty after a sniper's bullet in Afghanistan left him paralyzed two years ago.

Now he plans to retire from the Marine Corps, but not before walking across a stage with robotic leg braces to receive a Bronze Star.

Herrera will be honored Friday at Camp Pendleton, north of San Diego, in a ceremony that will also mark his medical retirement after 8 1/2 years in the military.

Herrera has vowed to retire while standing, like he did when he joined the Marine Corps.

"I could easily go and roll up in my wheelchair, but for me it's a mental and emotional goal that I set for myself: to stand up and walk out of the Marine Corps," said Herrera, who was the first American to purchase the ReWalk system recently approved by the Federal Drug Administration.

The special operations officer is being honored with the Bronze Star for his actions on June 14, 2012, when the patrol he was leading came under heavy fire in Afghanistan. Herrera continued coordinating efforts while receiving treatment for his own spinal injury and collapsed left lung.

"The bravery and fortitude he displayed inspired his men to heroic feats as they valiantly fought to save the lives of their wounded team members and repel the enemy assault," wrote Maj. Gen. M.A. Clark in recommending Herrera be recognized with a Bronze Star.

Left paralyzed from the chest down, the 30-year-old Marine sought to be allowed to remain on active duty and also has pushed himself to get back to walking. His last day on active-duty is Nov. 30.

The ReWalk is a robotic exoskeleton system that allows people with spinal cord injuries to stand and walk.

The device consists of leg braces with motion sensors and motorized joints that respond to subtle changes in upper-body movement and shifts in balance. A supportive belt around the patient's waist keeps the suit in place, and a backpack holds the computer and rechargeable battery. Crutches are used for stability, and the FDA requires an assistant be nearby. Herrera's wife assists him.

The MARSOC Foundation, a charitable fund for members of the Marine Corps Special Operations Command, raised the money for Herrera to buy the $69,500 device.

Herrera is working on a master's degree in business administration at the University of California Los Angeles and plans to start his own business.

"Every day is a choice to live, love, inspire, honor the fallen, make the world a better place and walk in the footsteps of giants," Herrera wrote in a Thanksgiving holiday column published by UT San Diego in 2013.