On Friday, July 9, 2010, FBI special agent Richard DesLauriers disembarked from a chartered Vision Airlines jet on the tarmac of Vienna’s Schwechat International Airport, accompanied by 10 Russian sleeper agents and their families. Nearby, four Russian prisoners got off a plane that had just landed from Moscow. The two groups headed toward each other under the baking Central European summer sun for a rare and unusually large exchange of captured spies. It was the culmination of what a former senior Justice Department official calls “one of the most complicated and impressive counterintelligence operations” in recent U.S. history.

Less than three years later, DesLauriers is facing a very different challenge. As special agent in charge of the FBI office in Boston, DesLauriers, 53, is running the Joint Terrorism Task Force investigation into the Boston Marathon attacks, the first successful terrorist bombings on U.S. soil since 9/11. The bombing is a different kind of case from the one DesLauriers spent his career investigating: a 25-year veteran of counterintelligence, he made his bones running operations against foreign spies, not tracking down and busting terrorists. For DesLauriers and the FBI, the Boston Marathon bombing is a high-visibility test.

Former and current colleagues at the FBI and Justice Department say DesLauriers and the FBI are up to the task, and they say the roll-up and exchange of the Russian spies, dubbed Operation Ghost Stories, shows it. After 9/11 the FBI was criticized for failing to coordinate with other agencies and for being stuck in a Cold War–era mind-set. In the roll-up of Ghost Stories the FBI pulled off a politically and diplomatically delicate operation that involved coordination with multiple intelligence agencies, U.S. attorney’s offices and local field agents. “Rick is the real deal,” says David Kris, former assistant attorney general for National Security during the Russian roll-up, “He’s very, very good, extremely methodical and organized.”

On paper, DesLauriers looks like a classic FBI special agent. He grew up in Longmeadow, Mass., went to Assumption College in Worcester, Mass., and then got a J.D. at Catholic University of America in Washington, D.C. — “a good Catholic boy,” says his friend and former FBI colleague John Slattery, who worked with him in counterespionage for 15 years. DesLauriers joined the FBI as a special agent in 1987 and went straight into spy work. After a few years in New York and D.C., he returned to Boston in 1997 ultimately supervising the FBI’s counterintelligence programs in the Northeast. In March 2008, he was promoted to head the FBI’s counterintelligence operations and espionage investigations as deputy assistant director.

Jessica Rinaldi / Reuters

FBI special agent in charge Richard DesLauriers

After the 2008 election, DesLauriers was given the unenviable assignment of rolling up Operation Ghost Stories. The Obama Administration, prodded by the powerful new CIA chief Leon Panetta, decided to deliver on a long-standing desire of the agency’s clandestine service to free four agents who had been jailed by the Russians. Looking around for something to trade for them, the Administration settled on the Russian sleepers, foreign agents being watched by the FBI while operating in America. The plan was to arrest and trade the 10 Russian sleepers in the U.S. for the four agents being held in Moscow.

“The bureau had to figure out, O.K., how in the hell do we play this,” says Slattery. The case would require DesLauriers to coordinate hundreds of people in different agencies, successfully arrest the spies without alerting them beforehand, and collect enough evidence of the spies’ activities to ensure they could be convicted.

But the toughest part could have been getting FBI field agents to work with the CIA. Operation Ghost Stories was one of the FBI counterintelligence division’s biggest successes. For more than a decade, agents had been running wires and surveillance on the 10 “illegals,” Russian nationals who were living and working in the U.S. under deep cover and without the protection of diplomatic immunity. “These were some of the best intelligence operatives the Russians have ever had,” says the former senior Justice Department official. And until they were arrested, they were unaware the FBI was monitoring them as passed intelligence to handlers from the Russian government.

Throughout the Cold War, the FBI and CIA famously clashed over intelligence matters, and the 9/11 Commission Report found miscommunication between the agencies had contributed to missing the plot. So when the FBI counterintelligence division was told that it should roll up one of its most successful operations against unsuspecting spies and give them a free ticket home in exchange for some captured CIA agents, not everyone was happy. Says Slattery, “There was a broader national-security equity at stake. Rick saw that and I think communicating that down to the agents in the field, everybody accepted that in the end it was a great case, despite the fact that it didn’t end with anybody sitting in jail for a real long time.”

Not all DesLauriers’ characteristics are well suited for counterterrorism. “He comes across as a bit bookish,” says the former senior Justice Department official. Obsessed about being read into the details of the cases, DesLauriers “could be criticized for overdoing it,” says Slattery, meaning his friend is a bit of a perfectionist when it comes to being prepared. And where counterintelligence agents can spend years monitoring suspects without arresting them, counterterrorism cases can be rapidly changing.

But Slattery and others say the Russian roll-up shows DesLauriers is up to managing a complicated case like the Boston bombing. FBI director Robert Mueller apparently agrees: he named DesLauriers to run the Boston FBI office on July 1, 2010, eight days before the Massachusetts native would complete the Operation Ghost Stories spy swap at the airport in Vienna.