James Murray is retiring as director of the U.S. Secret Service after a 27-year career with the agency to take a position with Snap, Snapchat’s parent company, as chief security officer.

Murray will join Snap after his term with the Secret Service ends July 30, 2022. He will report directly to CEO and co-founder Evan Spiegel.

“We’re thrilled to welcome Jim Murray to Snap and look forward to him joining our team on August 1,” a Snap rep said in an emailed statement to Variety. “Jim will bring a wealth of experience to this new role, which will help ensure the safety and security of the more than 5,000 Snap employees who live and work across the globe.”

The Secret Service announced Murray’s retirement on Thursday. He has served as the agency’s chief executive since May 1, 2019, and has since then “successfully guided the agency through eight National Special Security Events and nearly 20,000 international and domestic protective operations,” according to the Secret Service. During his tenure as director, the agency also recovered approximately $4.2 billion in fraud loss and prevented an estimated $8.1 billion in additional losses from criminal enterprises.

Murray began his federal service in 1990 as an investigator with the U.S. Department of Transportation, while concurrently serving as an officer in the U.S. Army Reserve. In 1995, he joined the Secret Service as a special agent in the New York Field Office where he investigated cyber-enabled financial crimes and served as the agency’s liaison to the FBI-NYPD Joint Terrorism Task Force.

A native of Point Pleasant, N.J., Murray earned a bachelor’s degree from the University of Scranton and a master’s degree from Seton Hall University. He is also a graduate of the American University Key Executive Leadership Program and the 2016 FBI Leadership in Counterterrorism (LinCT) FVEY Fellowship Program.

Snap’s hiring of Murray was first reported by the Washington Post.

VIP+ Analysis: Social Media Giants Face Uncertain Future