Military contractors in war zones often make headlines for all the wrong reasons: allegations of money misspent, or lives lost. Tuesday, the Pentagon honored three retired special operators-turned-contractors who saved multiple lives and risked their own in two fierce firefights in Afghanistan.

Michael “Tony” Dunne, 45, and William (Tim) Nix, 63, ran to the sound of an explosion when insurgents attacked Camp Integrity in August 2015, the heavily fortified U.S. special-operations base in the center of Kabul. Insurgents had blown the main gate, collapsing the guard tower and killing several local guards, the men said.

“I was at work, and the first thing I heard was the explosion that killed... about nine,” at the front gate, said Nix of the attack. Dunne and Nix followed the sounds of gunfire and joined a handful of U.S. special operators who were fighting a second wave of attackers who had penetrated the compound. The attackers killed U.S. First Sgt. Peter Andrew McKenna Jr., who had led the fightback.

“He said, ‘Hey, we’ve got to plug the hole,’ and as soon as we went out, he bought it,” Dunne said. “He went down fighting.”

Then both of them came face-to-face with an attacker wearing a suicide vest.

“He decided to clack off about 30 feet in front of us,” Dunne said. “That’s when I pretty much thought I was dead.” Dunne ducked behind a concrete wall just in time.

Brandon “Ray” Seabolt, 53, was accompanying a special-ops team hunting a top Taliban official in Helmand, Afghanistan, in December 2017. He entered a compound together with Afghan commandos and U.S. special-operations forces. Seabolt spotted an open door facing them—and smelled danger. He pulled the nearest teammate to the side, but not before a burst of gunfire from inside the building cut down both Afghan and American troops.

He took position to the side of that open doorway and opened fire, and kept firing, buying time for his colleague, “Mike,” to pull the wounded out of the line of fire. He said Mike later got a Silver Star for his actions, but declined to share his full name.

“If he had not come back into the compound, when I was there by myself, I probably wouldn’t be here today,” Seabolt said. Like the other contractors, he was more comfortable talking about his colleague than himself. “We entered the compound with about 10 people, and there was two of us left,” still fighting.

Two Afghan commandos were killed, and two American special operators and an interpreter were among the many injured, he said.

All three contractors had been in combat before, in Iraq and Afghanistan. For risking their own lives to save others, all three were awarded the Defense Medal for Valor, the highest civilian award for bravery, created after the attacks of Sept. 11, 2001, to recognize government employees or private citizens who risk their safety when confronted with danger. Only 17 have been awarded, including those bestowed on Dunne, Nix, and Seabolt.

The three men work for the Pentagon’s Defense Threat Reduction Agency—specifically serving the arm that tracks the evolution of homemade explosives, the Joint Improvised-Threat Defeat Organization. Their job is to track the latest technology on the battlefield, from suicide vests to car bombs to roadside bombs constructed with near-undetectable carbon triggers. Putting them in the field puts them closer to the troops, both to quickly spread new information from head office to the battlefield and to see deadly technology firsthand, explained Vayl Oxford, the director of the Defense Threat Reduction Agency.

“We’ve had up to 170 to 200 people embedded,” in war zones with both Special Operations and Central Command, Oxford said. They track ISIS and Taliban personnel—Who are the bomb makers? Where are they getting their training?—and advise troops on how to stop them. “The goal there is to help identify the network’s activities—the people, the products... Who are the suppliers? Where are they going? How do we interdict?”

That usually means being part of the planning of an operation, not in the middle of it.

“I would not say it’s common, but they are trained and prepared for it, in the eventuality that it does happen,” he said.

That’s partly why the Pentagon looks for contractors who’ve been there, and done this before.

“They are all former special operators,” said Lt. Gen. Darsie Rogers, DTRA’s deputy director, addressing the men and their family and friends gathered to mark the honor. “Seasoned professionals. And frankly gentlemen, we expect nothing less,” he said, earning wry smiles from the awardees.

Might they be under fire again?

“It’s always a possibility,” Dunne said, with a shrug. All three still work in war zones.