The catalyst for Gordon B. Johnson’s career with the FBI came from a heinous crime. He remembers clearly the day in 1995 when a former U.S. soldier parked a rented truck packed with explosives outside a government building in Oklahoma City and ignited the fuse.

The explosion orchestrated by Timothy McVeigh reduced the building to rubble, killing 168 people and injuring hundreds more.

“I saw all the resources that the FBI was bringing to that investigation and how they were determined to figure out who did this very despicable act,” said Johnson, who was in the Army at the time but joined the FBI that year. “I thought, wow. That is a force of good. . . . I was drawn to that.”

Johnson says his career has come full circle with the arrest of Christopher P. Hasson. Federal authorities say the U.S. Coast Guard lieutenant stockpiled weapons and planned a widespread domestic terrorist attack targeting politicians and journalists.

Johnson, who retired Thursday as the special agent in charge of the FBI field office in Baltimore, said agents worked tirelessly with Coast Guard investigators and prosecutors to prevent what they believe would have been a devastating attack.

“You saw the photograph with the weapons that we confiscated, and if you look at each one of those weapons and each one of those rounds of ammunition, it could have been a potential victim,” Johnson said while reflecting on his career from his office in Baltimore County. “There’s an individual tragedy in each one of those shell casings that I’m glad we were able to potentially get in front of.”

Hasson was arrested on gun and drug charges this month after the Coast Guard Investigative Service and agents with the FBI in Baltimore began reviewing activities that prosecutors said were linked to Hasson’s white-nationalist views. Federal law enforcement officials seized a cache of guns and ammunition from his basement apartment in Montgomery County in the Maryland suburbs north of Washington and said Hasson used his government computer to plan an attack.

Hasson’s defense lawyer has said the government’s accusations are a “histrionic characterization” of Hasson with “no actual indication of any plan.”

Johnson said he could not address the specifics of the Hasson case, citing the ongoing investigation. But he said the round-the-clock effort agents put in to bring about an arrest — including working through the government shutdown — highlights why he has loved his more than two decades with the FBI.

“We have some really hard-working agents, analysts and professional staff here,” Johnson said. “They’re working this case, and they see it for what it is, and they don’t stop.”

Johnson, 50, ends his FBI career after two years as the head of one of the busiest field offices in the country. The Baltimore office covers 7 million people across Maryland and Delaware.

Johnson, a native of Frederick County, Md., graduated from the U.S. Military Academy and served as an infantry officer in the Army before becoming an FBI special agent in New York. From there, he moved to counterintelligence at FBI headquarters in Washington, supervising various counterterrorism, cyberintelligence and counterintelligence programs in assorted offices before taking over as the special agent in charge in Baltimore in 2016.

There, Johnson has dealt with numerous crises that have made national news. There were mass shootings, including one at the Capital Gazette newsroom in Annapolis that killed five, and the workplace shooting at a countertop company in Edgewood that killed three. And there was a prison riot in Delaware that killed one, and the line-of-duty deaths of at least six local police officers.

Johnson said the FBI is immediately on the ground for those events because, should one turn out to be a case of terrorism, the agency would take charge. Major events are intense, Johnson said, as he and other agents rush to the scene, interact with traumatized victims, comb the Internet for intelligence and coordinate with local law enforcement.

Johnson also has overseen efforts to beat back violent crime and shut down public corruption.

Violent crime increased in Baltimore around the time he took over the field office, with homicides reaching record levels. Agents have been working with city police to ramp up enforcement efforts targeting major actors and gangs that drive most of the crime in the city.

Johnson said the FBI has also been focused on its partnership with Prince George’s County, which he and Police Chief Hank Stawinski often say has been a major factor in driving down violent crime in the Maryland jurisdiction bordering Washington.

“We have some work that our cross-border squad is doing in Prince George’s County where you’re talking about how homicides are down,” Johnson said. “I know that we’ve done work there that has helped that community, so I’m pretty proud of that.”

In Prince George’s, several politicians, public officials and liquor store owners were convicted in a bribery scheme to push legislation that would expand liquor sales. In Baltimore, federal officials cracked down on the police department’s Gun Trace Task Force involving officers who clocked fraudulent overtime pay while stealing money and drugs from suspected drug dealers and civilians.

A Pittsburgh Steelers fan who keeps a yellow “Terrible Towel” in his office and grew up watching games on a TV with a rabbit-ear antenna, Johnson said he plans to rest and enjoy time with his family before looking for work in the private sector.

And, when the time is right, he wants to visit the family of Richard Collins III. Collins was killed at the University of Maryland in what prosecutors say was a hate crime. The Army second lieutenant was days away from graduating when he was killed, and Johnson remembers being asked by University of Maryland Police Chief David Mitchell to help with the investigation.

 “When I see the photos of him and his family, I actually kind of see myself as a young lieutenant coming into the Army,” Johnson said.

It is one case, he said, “that will always resonate.”