Tesla Inc. (TSLA - Get Report) is going on the defensive.

The electric automaker said in a blog post that it plans to fight a class-action lawsuit a former employee filed against it alleging the company's Fremont, California, production plant of being a "hotbed of racist behavior."

In response, Tesla posted to its blog on Tuesday an entry titled "Hotbed of Misinformation." The post said Tesla "would rather pay ten times the settlement demand in legal fees and fight to the end of the Earth than give in to extortion and allow this abuse of the legal system."

Former Tesla worker Marcus Vaughn filed the suit against Tesla on behalf of a group of black workers on Monday, Nov. 13. Vaughn claimed he and other workers were addressed using racial slurs and that the company ignored their complaints about the behavior.

Tesla said it had previously investigated "disappointing behavior" and fired three employees from a group of individuals who worked closely with Vaughn or near his team. In the post, the company wrote, "Tesla is absolutely against any form of discrimination, harassment, or unfair treatment of any kind. When we hear complaints, we take them very seriously, investigate thoroughly and, if proven to be true, take immediate action."

Tesla continued in the post to refute several of Vaughn's claims, including the size of the group affected. The company also pointed out that Vaughn was employed by a temp agency, not Tesla, and that he was not fired, but rather his six-month temp contract expired as planned.

"We believe this was the fair and just response to the facts that we learned," Tesla wrote. "There will be further action as necessary, including parting ways with anyone whose behavior prevents Tesla from being a great place to work and making sure we do everything possible to stop bad behavior from happening in the first place."

Tesla stock fell 1.9% to $302.81 early Wednesday.

More of What's Trending on TheStreet: