As the danger escalated that summer night in 2009, the Marines made a judgment call: They were better off leaving the Afghan village they had raided than launching a massive gun battle against a team of enemy fighters that had stumbled upon them.

Under fire, the Marines made it back to their vehicles, but as they pulled away, a roadside bomb ripped through a Humvee midway through their convoy of about eight vehicles, said several Marines who witnessed the blast. With a plume of dust and a flash of heat, the explosion launched the armored vehicle at least 30 feet into the air, killing an interpreter and the driver. All four survivors in the vehicle were severely wounded — but none more than Master Sgt. Eden Pearl, who suffered a traumatic brain injury and burns over more than 90 percent of his body.

Pearl, who died at age 40 this week after a six-year battle with his injuries, was said to have been the most severely wounded service member to have fought in the Afghanistan conflict and survived. He persevered through months of painful skin grafts and numerous surgeries, and the loss of both legs and one arm due to infections.

Pearl’s family declined to comment through a spokesperson, but an open letter distributed on their behalf on Facebook said he died peacefully on Sunday in San Antonio, Tex. alongside his wife, Alicia, and their daughter, Averey. The Marine Corps acknowledged his death in a Facebook post on Monday night.

“We all know that Eden was ‘the guy’ we all aspired to be,” said the letter. “Feared by most but loved by all, his ability to bring the best in all was unmatched. When we talk heroes, Eden’s name comes to mind immediately. His devotion to family was truly stunning and what I admire most about a guy we had the luck and fortune to befriend. As much as we all knew him as a warrior, we loved him for what he was, just a damn good friend, husband and father.”

Little about Pearl is known outside the military. But several current and former elite Marines said his fearlessness, toughness and smarts under fire are legendary in Marine Corps Forces Special Operations Command (MARSOC), an organization where he was an early member in 2006 after serving in the service’s Force Reconnaissance units.

With his muscular physique, network of skull tattoos and thick red beard, Pearl looked like a “Viking warrior” while deployed, said Adam Kinosh, a former gunnery sergeant who was in Pearl’s team and helped respond to the 2009 explosion. Pearl’s ability to elevate the preparation and ability of other combat-hardened Marines was appreciated across the force, to the point that others looked for ways to work with him. His call sign was Mosh Pit, after the gritty areas at rock concerts where fans slam into each other while enjoying the music.

“He was there to go do battle, and he acted that way, and he trained that way, and he ran our team that way,” Kinosh said. “It was definitely the most significant leadership experience I had while I was in the Marines, and I was in the Marines for 14 years. His combat leadership far surpasses anyone else I’ve ever worked with. This guy was a master at gunfighting.”

Master Sgt. Peter Boby, an active-duty member of MARSOC who deployed as a combat replacement to fill in for wounded Marines in Pearl’s team after the explosion, said an award for marksmanship already is named after Pearl in MARSOC’s initial training.

“He was one of those guys who you knew of him before you met him,” Boby said. “He was that good. He was a legend in Force Recon.”

Pearl joined the Marine Corps in July 1994 from the town of Monroe, N.Y., before turning 19. After graduating from recruit training at Parris Island, S.C., he became an infantry rifleman, and then completed virtually every difficult form of training the service had, becoming a scout sniper, reconnaissance Marine, combat diver and critical skills operator in MARSOC. His training left him capable of performing anything — from free-fall aerial dives from airplanes to close-quarters combat after breaking down a door.

Pearl saw his first combat in Kosovo, where he was a part of three operations from 1999 through 2001, serving as part of a peacekeeping force deployed to prevent ethnic cleansing in the Balkans. In 2003, Pearl was part of the initial wave of Marines who invaded Iraq. He deployed to Iraq again in summer 2004, serving in a reconnaissance unit that was deployed through early 2005, according to records released by the Marine Corps.

MARSOC was established the following year at the direction of then-Defense Secretary Donald Rumsfeld, after a detachment of Special Operations Marines from Camp Pendleton, Calif., deployed to Iraq in 2004 alongside Navy SEALs and other Special Operations troops as part of a pilot program. To make MARSOC work, however, the command needed to pull people in from Marine Corps Force Reconnaissance units — including Pearl.

MARSOC’s first commander, retired Lt. Gen. Dennis Hejlik, said in a phone interview that Pearl was part of a generation of enlisted staff noncommissioned officers who got the service’s Special Operations force off the ground.

“You can’t really single him out, because all those staff NCOs were so strong when they came on board,” Hejlik said. “But we had a training program and we had a strategic plan, and those guys all stepped on board with it, and he was one of them.”

As part of 2nd Marine Special Operations Battalion at Camp Lejeune, Pearl was selected to lead his own team of Marines in combat in Afghanistan ahead of its deployment in March 2009. They arrived in Herat province, joining a task force run by Army Special Forces in a region of western Afghanistan where few conventional troops patrolled.

Garth Roe, a former staff sergeant on Pearl’s MARSOC team, said that Pearl’s leadership helped him get through the deployment. After Roe suffered a gunshot wound to the hip and had to be evacuated from the battlefield on Aug. 1, 2009, Pearl uplifted his spirits by praising the younger Marine for how much he had improved in combat in a phone call while Roe was hospitalized.

“He had this aura about him where you just wanted to follow him. You just wanted to please him,” said Roe, who left the military early this year. “Just hearing something like that, it’s probably one of the proudest moments of life, that a guy like that would say something like that to me.”

Little more than two weeks later, on Aug. 16, 2009, the roadside bomb hit the team. Those who were thrown from the vehicle survived with serious injuries, while those who were stuck inside got the worst of it, including Army Cpl. Nick Roush, the driver.

“There was no recovering this vehicle,” said Kinosh, who was in a vehicle toward the front of the convoy when the blast hit. “It was completely engulfed in flames. It took every fire extinguisher that we had just to get close enough to grab [Roush] and get close enough to pull his body out. Everything was on fire. It looked like there was metal dripping off the vehicle. It was incredible. Ammo was cooking off left and right.”

Even then, though, it was hard to tell the extent of Pearl’s injuries, said Lou Dennis, a retired master sergeant who served as a bomb technician in the unit. While their leader was in pain, he also was coherent and asking questions about the situation while under a burn blanket.

“He was doing exactly what you’d expect a Marine to do: asking how everyone was, and then giving a rundown of all the gear that was inside the vehicle,” Dennis said.

Pearl was placed in a medically induced coma for a long period of time afterward, and shifted between several hospitals for specialized treatment. The decision to amputate was made a couple months after the blast, Kinosh and Roe said. Pearl was promoted after his injuries to master sergeant, and medically retired by the Marine Corps afterward.

Roe said he visited Pearl and his family frequently after the blast, but the Marine’s traumatic brain injury made it “almost impossible to communicate” with him. The family eventually moved him from the hospital to a new home in San Antonio funded by the Gary Sinise Foundation and the Brothers in Arms Foundation, a nonprofit organization run by Phil Noblin, a former teammate of Pearl’s.

Hejlik credited Pearl’s wife for being a driving force in keeping her husband alive.

“Honestly, she’s one of the strongest women I have known and seen, the way she protected her husband to make sure he was getting the care that he was supposed to,” said Hejlik. “I think she was really the driving force behind his will to live, because he was in really tough shape at the time.”

Bob Roush, the father of the U.S. soldier killed in Pearl’s vehicle, said that after his son died, some of the Marines deployed with him and Pearl visited the Roush home in Michigan with stories about how much they admired Pearl. The younger Roush was excited to deploy with elite Marines and admired Pearl greatly, the father said.

“They all call him a legend,” Roush said. “The guys who came to my house said that Eden should have been born in a time when they swung battle axes, because he would have been the toughest battle ax swinger ever.”