var _ndnq = _ndnq || []; _ndnq.push([’embed’]);

FREMONT — DeWitt Lambert first spotted Tesla CEO Elon Musk and his futuristic company in a magazine a few years ago.

Inspired by Musk, Lambert packed his car in Alabama and drove across country. He eventually landed a job at the Tesla factory in 2015.

“I wanted to try my luck,” he said. “I wanted to pursue the land of opportunity.”

But working on the Tesla assembly line for two years brought a harsh reality to Lambert’s dreams, according to a suit filed Monday.

Lambert, an African-American, claims in the suit he endured months of harassment — physical, sexual and racial taunts that included liberal and repeated use of the N-word. One day, a co-worker stole his phone and recorded a minute-long video rant filled with racial epithets and violent threats. Lambert complained to supervisors, but he said the company didn’t do enough to stop it.

In a detailed statement to this newspaper, Tesla said it found the video “disappointing and contrary to our values.” Several employees have been fired because of the incident.

But the company said an internal investigation discovered a more complicated dispute between co-workers who socialized outside of work and regularly bantered in off-color language.

The dispute apparently stemmed from an earlier comment Lambert made to a co-worker, Tesla said. Lambert also used the N-word twice to refer to colleagues in a Facebook message, according to a copy of the exchange provided by Tesla to this newspaper.

It’s the latest in a series of examples of worker unrest at the Fremont factory. The electric vehicle maker is rebuffing union-organizing efforts and parrying complaints about conditions and pay, even as it struggles to balance rapid growth and thrive as California’s only automaker.

Lambert claims in his suit, filed in Alameda County Superior Court, that the harassment began shortly after he started at Tesla in June 2015.

At first, the suit claims, younger co-workers in their 20s hazed Lambert, 44, putting stickers on his back, hiding his tools, and stealing his phone to take photos and videos without his permission.

After a month or two on the assembly line, employees regularly began calling Lambert racial epithets, the suit says. The minute-long video, taken by a supervisor with Lambert’s phone, shows young employees flashing gang signs while the supervisor rapped how he was going to cut Lambert up in pieces and send body parts to his family, according to the suit. The video narration is laced with the N-word.

The co-workers also belittled him and made lewd remarks about sex, the suit says. One time, an employee stuck a drill gun into Lambert’s buttocks in front of his co-workers.

“Sometimes, I had to laugh to keep from showing my anger,” Lambert said in an interview at his lawyer’s office in Oakland. “It never did stop.”

Lambert told his supervisors about the treatment and tried several times to transfer out of the department, the suit says. Eventually, he was transferred to another section of the production line.

The harassment continued on his new shift, according to his suit. A supervisor reported him for eating a candy bar on the line, even though just days before employees were sharing a box of doughnuts and eating on the production floor. Lambert was also reprimanded for posting a Facebook photo of him in the factory — a breach of rules that was commonly overlooked by supervisors, his suit says.

Lambert also claims in the suit he suffered a back injury because he was not rotated from his position on the line every two hours, as required by company policy.

But the company said Lambert first complained to human resources about harassment and offensive language in April 2016, after a dispute with a colleague. Lambert, who was friends with the man, believed his co-worker filmed the dispute and was taking the video to human resources.

In response, Lambert went to the department first, apparently to pre-empt the accusation, the company said. No video of the argument was ever given to Tesla managers.

Tesla human resource employees interviewed the workers involved, who told them Lambert also used racially insensitive language, according to the company. Human resources coached the group of employees on professional behavior. Lambert was then transferred to another work area.

In July, Lambert was reprimanded for posting the factory photos on social media. During the discussion with human resources, the company said, the offending video was shown to management for the first time. The company re-opened its investigation.

“We looked into his claims and found that the co-workers DeWitt complained about described the situation very differently,” the company said. “They claimed once again they had all been friends and socialized outside of work, and that all of them (including DeWitt) used similar insensitive language with each other on a regular, ongoing basis, including in social contexts outside of the workplace.”

Tesla said it placed Lambert on paid leave pending an investigation into his Facebook messages and comments to a co-worker. It fired several employees, and said it will continue to root out workers whose behavior fails to meet the company’s standards.

Tesla employs about 6,200 workers at its Fremont factory. As the high-tech electric vehicle company has increased production, workers have complained about conditions and safety.

Last year, the company and contractor Eisenmann settled a suit with a Slovenian worker seriously injured while working on an expansion on a paint shop. An investigation by this newspaper found a subcontractor paid Eastern European men on business visas less than $5 an hour for the construction work.

This year, two Tesla workers publicly chronicled difficult and pressure-filled factory conditions.

Jose Moran, a production worker, criticized the company in February for unsafe work conditions, long hours and low pay. The average Tesla production worker typically makes between $17 and $21 an hour, lower than the national average for an auto worker at $25 an hour, according to the United Automobile Workers, which is supporting an effort to unionize.

Musk has insisted the factory is safe and worker pay is competitive — including stock awards and discounts.

Lambert wants to continue working at Tesla to support his five children in California and Alabama.

“My family thinks I’ve got the most exciting job in the world,” he said.

The suit, filed against Tesla and several employees, seeks unspecified damages and legal fees. Larry Organ, Lambert’s attorney, said he expects a trial date to be set for late next year.

Organ said Lambert is on medical leave from Tesla.

“Why didn’t they stop this?” Organ asked. “What this tells me is that there’s a problem at the company.”

Warning: The lawsuit document below includes profanity and other offensive language.