An aerial view of the Tesla Fremont Factory on May 13, 2020 in Fremont, California.

The S&P 500 removed the electric vehicle maker from its ESG index. Apple, Microsoft, Amazon and Exxon Mobil were included on the list.

The S&P 500 ESG Index uses environmental, social and governance data to rank and recommend companies to investors. The way businesses affect the planet and treat stakeholders beyond shareholders are included in its criteria.

On May 2, the changes to the index took effect, and a spokesman for the index explained why in a post published Wednesday.

It said that the lack of a low-carbon strategy and code of business conduct was one of the factors that affected the factory. The handling of an investigation by the National Highway Transportation Safety Administration weighed on its score.

In February of this year, the Environmental Protection Agency took action against the company after years of Clean Air Act violations and neglecting to track its own emissions. Exxon Mobil came in 26th on the Toxic 100 Air Polluters Index, which was compiled annually by the U-Mass Amherst Political Economy Research Institute. The most recent data is used in the index.

In its first-quarter filing, the company disclosed that it had to pay a fine in Germany for failing to take back spent batteries and that it was being investigated for its handling of waste in the state of California.

California's Department of Fair Employment and Housing suedTesla over anti-Black harassment and discrimination. The agency says it found evidence that the company kept Black workers in low-level roles, gave them more physically demanding and dangerous assignments, and retaliated against them when they complained about racist slurs.

The National Labor Relations Board said last year thatTesla had engaged in unfair labor practices.

While it may be playing its part in taking fuel-powered cars off the road, it has fallen behind its peers when examined through a wider ESG lens.

Musk, who has more than 90 million followers on his account, said on Wednesday that S&P Global Ratings has lost their integrity.

I am increasingly convinced that corporate ESG is the Devil Incarnate.

In a company impact report,Tesla wrote.

Current environmental, social and governance reporting doesn't measure the scope of positive impact on the world. The dollar value of risk is the focus. Individual investors who give their money to ESG funds of large investment institutions are unaware that their money can be used to buy shares of companies that make climate change worse.

Even if they barely reduce greenhouse gas emissions and continue manufacturing internal combustion engine vehicles, other automakers can achieve higher ESG ratings, according to a report byTesla.

There was a broad market sell-off that led to a decline in the shares ofTesla. The company's stock is down more than 30% this year.