What just happened? A former Apple engineer has been charged with allegedly stealing trade secrets. Authorities believe that Xiaolang Zhang, who worked in the company’s autonomous car division, was leaving Cupertino for a Chinese car startup backed by Alibaba, taking Apple’s intellectual properties with him.

Federal agents stopped Zhang at San Jose International Airport on Saturday after he purchased a “last-second” ticket to Beijing. According to a tweet from Henry K. Lee, he stole the autonomous vehicle trade secrets while on paternity leave. Zhang told agents he intended to get job at Xmotors, a startup working on electric and self-driving vehicles, and that he had placed 40GB of Apple's data onto his wife’s laptop.

The federal complaint, filed in the U.S. District Court of Northern California, says Zhang designed and tested circuit boards as part of Apple’s Project Titan autonomous car team.

When Zhang returned from paternity leave, he informed his boss that he was moving to China to work for Xmotors. The supervisor felt the engineer was “being evasive” during the meeting, which led to Apple investigators searching his two company-issued phones and laptop. They found he had been downloading confidential files and removing items from Apple’s lab during his time away.

In an interview with Apple’s security team, Zhang admitted to taking both online data and hardware. The FBI described the information he stole as "largely technical in nature, including engineering schematics, technical reference manuals, and technical reports."

Apple’s Project Titan has been shrouded in mystery during the years it has been running. The company has hired a number of top executives from the automobile industry, and CEO Tim Cook admitted it is “focusing on autonomous systems.” But in 2016 it was reported that the firm was moving away from creating a fully driverless vehicle and would instead develop self-driving software.

Zhang is now facing up to 10 years in prison and a $250,000 fine.

In a statement to TechCrunch, the company said: “Apple takes confidentiality and the protection of our intellectual property very seriously. We're working with authorities on this matter and will do everything possible to make sure this individual and any other individuals involved are held accountable for their actions."