OpenAI has countersued Apple, accusing the company of stealing trade secrets and restricting its access to hardware suppliers. The filing follows Apple’s lawsuit alleging that OpenAI poached employees to obtain its technology.

OpenAI filed counterclaims in California federal court on Friday. It said Apple’s employment practices were designed to “trap” employees and stop them from working on competitors’ technology.

OpenAI said it is developing artificial intelligence-enabled personal electronic devices that could “outcompete Apple on what Apple views as its own turf.” The company also alleged Apple obtained confidential information by rehiring a former OpenAI employee who had worked there for six months. OpenAI said the employee had access to specific information about a new device and its roadmap for future hardware products.

“Given the timing, it now appears that stealing those documents may have been his reason for joining OpenAI in the first place,” OpenAI said.

OpenAI’s filing criticised Apple for encouraging employees to work on personal Apple devices and accounts, then preventing an orderly separation of work and personal accounts when they leave for new jobs. OpenAI alleged Apple continues to access former employees’ personal devices and accounts, allowing it to “monitor and ensnare departing employees” who move to competitors.

OpenAI said 400 employees have left Apple for the company so far, and alleged Apple wants to intimidate others from leaving for other technology companies.

Apple sued OpenAI and two former employees in July, alleging misappropriation of its trade secrets to benefit the ChatGPT owner’s move into consumer hardware. OpenAI has denied those allegations. Apple and OpenAI did not immediately respond to requests for comment from Reuters.

The dispute comes as competition for talent and proprietary technology intensifies alongside the race to develop AI products. The litigation concerns control of future AI devices that may not use traditional apps or operating systems and could draw consumer attention away from Apple’s best-selling iPhone. Analysts believe OpenAI is working on a phone or another device of its own.