(Reuters) - Tesla Inc filed a lawsuit on Thursday against a former engineer at the company, claiming he copied the source code for its Autopilot technology before joining a Chinese self-driving car startup in January.

FILE PHOTO: A Tesla logo is seen at a groundbreaking ceremony of Tesla Shanghai Gigafactory in Shanghai, China January 7, 2019. REUTERS/Aly Song

The engineer, Guangzhi Cao, copied more than 300,000 files related to Autopilot source code as he prepared to join China’s Xiaopeng Motors Technology Company Ltd, the Silicon Valley carmaker said in the lawsuit filed in a California court.

Separately, Tesla lawyers on Wednesday filed a lawsuit against four former employees and U.S. self-driving car startup Zoox Inc, alleging the employees stole proprietary information and trade secrets for developing warehousing, logistics and inventory control operations.

In a statement, Xiaopeng spokeswoman Marie Cheung said the company was not aware of Cao’s alleged misconduct and that the company has started an internal investigation on the matter.

The company “fully respects any third-party’s intellectual property rights and confidential information. The company has been complying and will comply [with] all applicable laws and regulations,” she said in a statement.

Cao and Zoox could not immediately be reached for comment.

Tesla is building a vehicle assembly facility in Shanghai, putting it in direct competition with Xiaopeng and other Chinese companies in the world’s largest electric vehicle market.

Its Autopilot is a driver assistance system that handles some driving tasks and allows drivers to take their hands off the wheel, although the company stresses it still requires driver supervision and does not make the vehicle autonomous.

Cao's LinkedIn profile shows here he has been working with Xiaopeng since January as "head of perception."

Xiaopeng, which debuted an electric car in Las Vegas last year, counts Alibaba Group Holding Ltd and Foxconn Technology Co Ltd among its investors.

The company, also known as Xpeng Motors, employs at least five former Tesla employees, the U.S. carmaker alleged in the lawsuit.

Apple Inc last year accused here one former employee of stealing trade secrets related to self-driving cars and joining Xiaopeng's U.S. subsidiary.

Several companies are racing to develop the technology required to make cars drive on their own and lawsuits against former employees have become common as firms strive to keep proprietary information in-house.

Alphabet Inc's Waymo self-driving vehicle unit took here Uber Technologies to court after a former employee stole thousands of confidential documents and became chief of Uber's self-driving car project. Uber later paid $245 million to settle the case.