The former Tesla technician Martin Tripp says Elon Musk is waging war on him for leaking information to Business Insider about the firm's raw-material waste and safety standards.

Tesla filed a lawsuit that accuses Tripp of hacking and of leaking "confidential and trade secret information" to third parties, while Musk has accused him of "sabotage."

Tripp has said he never hacked the information and leaked it because he was concerned about public safety.

Tripp said Tesla was "trying to do everything they can to silence me."

A former Tesla technician who calls himself a "whistleblower" says Elon Musk is waging war on him for leaking information to Business Insider about the electric-car maker's raw-material waste and safety standards.

Martin Tripp has done a round of interviews with The Guardian, The Washington Post, and CNN explaining his role in what has been an explosive week for Tesla.

It all started with a report in Business Insider on June 4. Tripp has admitted leaking information to this publication about the raw-material waste Tesla has produced while making parts for the Model 3, as well as safety concerns that punctured batteries were being put back into manufacture.

Tesla said that the claims about the raw-material costs were exaggerated and that no punctured battery cells were released back into the manufacturing process, though internal logs shown to the Business Insider reporter Linette Lopez suggested otherwise.

The Business Insider story triggered a furious response from Musk this week. In an email circulated internally at Tesla on Monday, the Tesla CEO said an employee had committed "sabotage" after not receiving a promotion.

Though Musk didn't name Tripp in the email, Tesla went on to file a lawsuit against the technician on Wednesday that did identify him. The lawsuit, available here, alleges that Tripp "unlawfully hacked the company's confidential and trade secret information and transferred that information to third parties."

The lawsuit further claimed that Tripp installed hacking software on the computers of three colleagues, continuing to export company data after his departure and essentially framing his former coworkers. It also said he made "false claims to the media" about the company.

Tripp spoke with media outlets on the record after being named, defending himself in a series of interviews. Business Insider has contacted Tesla for comment.

Tesla whistleblower maintains innocence

Tripp told The Guardian that he leaked the information not because he was disgruntled but because he felt his concerns were being dismissed by management.

"I kept bringing this up to management, supervisors, anyone who would listen," he said. "Everyone just said, 'Yeah, whatever.'"

He rejected the suggestion that he was a saboteur as "flat-out lies." He admitted providing Business Insider with information from Tesla's manufacturing operating system but said he obtained it by searching and not by hacking the database.

"I'm not that smart," Tripp said. "I don't know how to code. I tried to teach myself to code and I don't have the patience."

Tripp said he was motivated by public-safety concerns and was not selling trade secrets to rival companies. "I've never gone to any outside company, any oil-industry people," he said. "I care about the public and safety."

An alleged threat of gun violence

The story took another twist when Tripp was accused of making threats of violence.

A Tesla representative told CNBC and others that the company received a call on Wednesday from "a friend of Mr Tripp" saying that he would be coming to the firm's Gigafactory battery plant in Nevada to "shoot the place up." The police said there was "no credible threat" but noted that the investigation was ongoing.

Tripp told The Washington Post that he "never made a threat" and called Tesla's claims "insane." He told The Post that the police visited him Wednesday and that he was seeking official whistleblower protections.

Tripp told The Guardian that he viewed the threat allegation as an intimidation tactic. "They're trying to do everything they can to silence me," he said, "and trying to set an example so that no one else will talk to the press."

An explosive email exchange

Also on Wednesday, Tripp and Musk had an explosive email exchange about the episode. The emails were shared with The Guardian, the BBC, and The Washington Post.

Tripp initiated the email exchange on Wednesday, accusing Musk of telling lies to the public and investors. The tense conversation escalated quickly, and Musk said Tripp was a "horrible human being." Here's the full exchange:

Tripp: "Don't worry, you have what's coming to you for the lies you have told to the public and investors."

Musk: "Threatening me only makes it worse for you"

Tripp: "I never made a threat. I simply told you that you have what's coming. Thank you for this gift!!!!"

Musk: "You should ashamed of yourself for framing other people. You're a horrible human being."

Tripp: "I NEVER 'framed' anyone else or even insinuated anyone else as being involved in my production of documents of your MILLIONS OF DOLLARS OF WASTE, Safety concerns, lying to investors/the WORLD. Putting cars on the road with safety issues is being a horrible human being!"

Musk: "There are literally injuries[sic] with Model 3. It is by far the safest car in the world for any midsize vehicle. And of course a company with billions of dollars in product is going to have millions of dollars in scrap. This is not news.

"However, betraying your word of honor, breaking the deal you had when Tesla gave you a job and framing your colleagues are wrong and some come with legal penalties. So it goes. Be well."

Musk told The Guardian the emails were "unwise" on his part. "He initiated the email exchange this morning at 8.57am," he said in an email. "I certainly would not have initiated contact, nor would I even know his personal email address, and it was probably unwise for me to have responded."