The company says it is creating the safest car factory in the world.

Tesla has escalated its public-relations battle with the United Auto Workers as media reports detail allegations of unsafe working conditions in Fremont.

The Guardian published a lengthy report on employees' claims that Elon Musk's production goals have taken a higher priority than safety, leading to lengthy overtime and 'hundreds' of injuries among the factory's 10,000 workers.

Tesla conceded that many workers have put in long hours, but the company says it is working to create the safest car factory in the world.

"No car factory is perfect, but particularly given that Model S and X were the first cars we built at more than tiny volumes, we fully acknowledge that they were not designed for ease of manufacturing - far from it," the company wrote in a blog post. "As would be expected, we have since learned many lessons, including how to improve the production process for the well-being of our colleagues.

After Tesla added a third shift at the plant, average weekly time sheets are said to have dropped to 42 hours and overtime has been slashed by 60 percent. An ergonomics team was established in 2015 to further increase safety and directly collaborate with engineers during the design process.

"As just one example, we created simulations that showed us where reaching or bending by employees was most likely to occur, which in turn allowed us to redesign the equipment and the car to eliminate these issues as much as possible," Tesla says.

The Guardian report says Tesla's recordable incident rate (TRIR), which serves as a more objective measurement of injuries relative to the workforce population, was above the industry average from 2013 through 2016.

Tesla says its TRIR in the first quarter of 2017 has fallen to 32-percent below the industry average.

"Our goal is to have as close to zero injuries as humanly possible and to become the safest factory in the auto industry," the company says. "We will get there by continuing to ask our employees to raise safety concerns and to keep proposing ideas that make things even better."