Xialong Zhang worked at Apple on the development of the driverless car project but planned to leave the U.S. in favor of working for Chinese autonomous vehicle start-ups.

Court documents stated Zhang downloaded “copious pages of information” days before he attempted to board a flight to China.

According to the criminal complaint, Apple was suspicious of his actions when his network activity and visits to the office increased. The activity grew in April after Zhang came back from China on maternity leave. Upon returning he informed Apple of plans to resign and his intent to work for Xiaopeng Motors.

After receipt of his resignation, company officials asked Zhang to turn in his work-issued devices; an iPhone and Macbook. Upon receiving them the company was able to launch an investigation of his online activities.

They determined the majority of his time was spent downloading data in the days leading up to his resignation. Next, they proceeded to examine the building’s security footage for any suspicious activity.

A criminal complaint was filed by federal prosecutors, after Apple’s security footage revealed the employee leaving the building on April 28, 2018, with a large box holding circuit boards, cables, a keyboard, and a Linux server.

On June 27, the FBI searched the engineer’s house. The results from the search have yet to be released.

The former engineer was arrested Saturday, July 7, before he could board his flight at San Jose International. During questioning Zhang admitted to downloading several of the companies files and blueprints on his wife’s laptop.

However, he stated the downloads were not for malicious purposes. He insisted the data was for his education. Zhang further claimed he wanted to review the downloaded data for a chance to be hired by the company in the future.

He also admitted to stealing potentially classified information from an interview in June.

Xiaopeng Motors (Xpeng) stated there was not any “sensitive or irregular” information from Zhang when he signed the company’s “compliance document on intellectual property protection” on his first day of employment, according to South China Morning Post.

Although he had admitted to downloading driverless Apple technology for himself, there is no indication he shared these secrets with Xpeng or any other company.

The accused’s role as an Apple engineer was to analyze sensor data by testing and designing new circuit boards. If found guilty of the charges lodged against him, he faces the possibility of 10 years in prison and a $250,000 fine.

Zhang’s arrest adds to the growing tension between the U.S and China. This discord stems from questions about how Chinese companies deal with intellectual properties. The companies require foreign tech firms wanting to do business in China to share their intellectual property.