When a masked gunman entered country line dance Borderline Bar & Grill in Thousand Oaks, California, on Wednesday and started firing rounds, 22-year-old Marine Brendan Kelly knew from the first few pops what was going on.

“Being in the military, being in the Marine Corps, I’m aware of what that sounds like, especially in an enclosed area,” Kelly told ABC 7.

Kelly had been in a similarly tragic situation before: He was a 2017 concertgoer at the Route 91 Harvest music festival in Las Vegas during the largest mass shooting in U.S. history. On Oct. 1, 2017, a gunman had opened fire on the Vegas strip concert, killing 58 people and injuring nearly 500.

In the California shooting, like Vegas, Kelly’s Marine Corps training took over, he said. He threw people around him to the ground, and once he identified where the shooting was coming from grabbed the people closest to him and headed to the nearest exit.

Kelly told the Associated Press that he used his belt, the T-shirt off his back and his Marine Corps training to apply a tourniquet to a friend’s bleeding arm.

“There’s not time for emotions to be involved, you have to do,” he told ABC. “You have to act. Because people’s lives are on the line.”

The suspected gunman, Ian David Long, also had served in the Marines. He had deployed with the Corps during the surge Afghanistan in 2010 as a machine gunner.

This experience hit way too close to home for Kelly.

“Borderline was our safe space ... for the probably 30 to 45 of us that were all from the Ventura County area that were in Vegas,” Kelly told ABC.

Gunfire killed a Navy veteran who had lived through the shooting in Vegas just over one year ago. After the Route 91 shooting, Borderline had held a benefit concert for people from the local area who were killed.

“The only, only thing I can contribute to is God," Kelly said. "His protective hand over me that night, on Oct. 1, and last night.”

Kelly made news after the Las Vegas shooting for saving the life of a woman he had met two hours before.

"Before I knew what was going on, Brendan tackled me down to the ground and covered me from the fire,” Renee Cesario wrote on Facebook.

Marine veteran and Ventura, California, Team Red, White & Blue chapter captain Dan Manrique was among the twelve killed in Wednesday’s shooting.

Manrique had “served with 2nd Combat Engineer Battalion, 2nd Marine Division, as a radio operator, and deployed to the Middle East in 2007 with the 26th Marine Expeditionary Unit," according to a memorial page on Team RWB’s website.