Gabriel Gomez crossed the finish line of the Boston Marathon just minutes before Monday’s terror attack, and was standing nearby when he heard the roar of an explosion along Boylston Street.

He knew immediately, instinctively, it came from a bomb.

"I was a Navy SEAL. You know what the sound is," Gomez told The Hill.

Gomez, a Bostonian who is seeking the Republican Senate nomination in Massachusetts, remains shaken in the aftermath of the bombings, which left three people dead and nearly 200 injured.

But he is also thankful, because the day could have ended far worse for him and his family.

Gomez’s wife and four children were waiting to see him on his approach to the finish line, about a half a block from where the first explosion went off.

"I stopped there, greeted them, gave them a high five, went to the finish line, and within minutes made my way towards where I was supposed to meet my family and kids," he said.

For a few tense moments, Gomez was unable to find his family at their pre-planned rendezvous point, or reach them via cellphone.

Gomez finally got a text through, and sent his family home.

"I found out later, luckily, they left where they were (watching the race) to start making their way towards the rendezvous point. Because they were — literally, right within a half a block or so — pretty darn close to where the first explosion went off," said Gomez, 47.

"Somebody was definitely looking after us," he said.

While some eyewitnesses said they initially thought the explosions were related to the day's marathon celebrations, Gomez said he immediately recognized the blasts for what they were.

He turned around to see smoke billowing along the street, and chaos everywhere.

"You start seeing first-responders moving. Right away you saw police officers, getting on the phone, getting people over there as quickly as possible," he said.

Gomez spent the rest of Monday afternoon checking in with staff members who had planned to volunteer or work alongside the marathon path. He eventually made it over to a staffer's home in the Back Bay neighborhood of Boston, near where the blasts occurred.

Gomez, along with the four other Massachusetts Senate candidates, has suspended his campaign. The GOP candidate says he won’t resume campaigning until politics are appropriate again — a moment he wasn't ready to predict.

The Massachusetts Senate seat opened up when John KerryJohn Forbes KerryNorth Korea is moved by Pompeo diplomacy, but Dems dig in deeper Ex-Obama official Marie Harf, Guy Benson to co-host Fox News Radio show Five things to know about Russian oligarch Oleg Deripaska MORE resigned to become secretary of State earlier this year.

The Republican and Democratic primaries are set for April 30, with the general election on June 25.

Gomez, who works at an investment firm, is running in the Republican primary against State Rep. Dan Winslow and Michael Sullivan, a former acting director of the Bureau of Alcohol, Tobacco, Firearms and Explosives.

Democratic candidate Rep. Edward MarkeyEdward (Ed) John MarkeyDem senators demand Trump explain ties to Koch brothers Overnight Cybersecurity: Senators want info on 'stingray' surveillance in DC | Bills to secure energy infrastructure advance | GOP lawmaker offers cyber deterrence bill Overnight Tech: Alleged robocall kingpin testifies before Congress | What lawmakers learned | Push for new robocall rules | Facebook changes privacy settings ahead of new data law | Time Warner CEO defends AT&T merger at trial MORE has taken his ads off the air. It’s unclear whether a Democratic debate between Markey and rival Rep. Stephen Lynch scheduled for Thursday will go ahead.

Before Monday’s bombing, the marathon had been a celebratory event for Gomez, a chance to campaign and compete.

He shook hands with other racers earlier in the day and, according to the Boston Globe, held a pre-marathon “gathering with supporters.”

Gomez, who served as a pilot and later as a SEAL before leaving the military in 1996, dedicated each mile of the marathon to a different military veteran from Massachusetts.

He set up a page on his website with photos and information on the veterans, as well as quotes from each veteran about their service.

A staffer tracked his run and tweeted out a dedication to each veteran in real time.

"Dedicating final mile to all the servicemen and women who made the ultimate sacrifice defending our great nation. Forever in our prayers," read the last tweet, before Gomez's finish.

After a tweet giving his time of 4:08:03, Gomez issued one more tweet, related to the bombing.

"Thoughts and prayers to all the runners, families and spectators at the Marathon today - keep safe and keep those hurt in your prayers," he tweeted.

Gomez, in keeping with his pause on campaigning, declined Tuesday to discuss policy or politics. But he said that the Boston attack emphasizes the need for the U.S. to remain vigilant in the face of threats both international and domestic.

"We need to continue to acknowledge that we have a lot of threats out there that are not just international but are also domestic. And we need to continue to stay vigilant. We can't get complacent," he said.

"We unfortunately live in a world where we need to keep our liberties but we also need to make sure that we keep our home country safe, we need to do what it takes to do that."

Following the initial fear that spread during Monday's moment of tragedy, Gomez said he has been heartened by how Bostonians have responded to the attack.

The city’s response showed "the best of Boston ... in probably the worst event that's happened since anybody can recall,” Gomez said.

"It just shows you they messed with the wrong city. And Boston is even stronger today than it was yesterday," he said.