San Francisco/Wilmington/Southfield — Electric car maker Tesla has sued a former employee for hacking the company’s confidential and trade secret information, transferring several gigabytes to outside entities, along with illicit photos of the production line.

Tesla accused a former technician at the Nevada Gigafactory of launching a sabotage campaign after being denied a promotion. Martin Tripp wrote a computer program to access proprietary information, sending material to three unidentified entities and attempting to cover his electronic tracks, the company said in the complaint.

Tripp’s actions were "willful and malicious" and "done with the deliberate intent to injure Tesla’s business", the company’s lawyers said in the lawsuit, filed on Wednesday in federal court in Nevada.

Tesla has been racing to ramp up production of its critical Model 3 sedan to 5,000 cars a week. Last week, CEO Elon Musk announced that he was re-organising the company and shrinking Tesla’s workforce by 9% in a bid for profitability. More than 3,000 workers lost their jobs, and notices filed with the state of California revealed that more than 500 employees in Fremont and Palo Alto were dismissed.

On Sunday, Musk wrote a memo to employees alleging there was a saboteur within the company’s ranks. CNBC reported the memo in full, while Bloomberg confirmed it had been sent out. Musk said the company was still trying to figure out if the employee had acted alone, according to the memo.