Jeremy Soles finished the Marine Corps Marathon on Sunday.

Former Marine Sgt. Jeremy Soles made history on Sunday when he set a Guinness World Record for running the entire 26.2-mile Marine Corps marathon while wearing a gas mask in an unofficial time of 4 hours, 29 minutes and 2 seconds.

Soles, founder of the nonprofit group Team X-T.R.E.M.E., dedicated his achievement to Marine Cpl. John Michael Peck, who suffered traumatic brain injury in Iraq in 2007 but insisted on returning to combat, only to lose both arms and legs in a roadside bomb attack in Afghanistan in May.

“He embodies everything that Team X-T.R.E.M.E is about: Overcoming mental and physical obstacles,” Soles said in a phone interview on Monday.

Sunday’s event was the culmination of two years of conditioning and training. The gas mask restricts his breathing by about 25 percent, and all the gear associated with the mask weighs 15 pounds.

“A lot of times, people ask why we run in a gas mask,” Soles said. “Well, we use the gas mask to symbolize what we do. People often ask how difficult it is, and our first thing to tell them is it’s not nearly as difficult as overcoming traumatic brain injury, which he did, not nearly as difficult as overcoming post-traumatic stress disorder, learning how to walk again with prosthetic limbs – and people see the parallel.”

Soles met Peck about a month ago during a visit to Walter Reed Army Medical Center while looking for a wounded warrior to whom he could dedicate his record-setting run.

“It took me every bit of 10 minutes of being in the room to realize that he was definitely our guy,” Soles said. “I asked him, ‘Corporal, would you allow us to honor you and dedicate this run to you,’ and he said, ‘Most definitely.’ I said, ‘If we could work out the logistics, is there any way you could make it out there?’ And he said, ‘Anything to get me out of this hospital.’”

Peck was waiting for Soles when he crossed the finish line on Sunday. Afterward, Soles came over and gave his wounded comrade a smart salute.

“Corporal Peck, you are my hero,” Soles said.