Editor's note: On June 1, Elon Musk tweeted that he is withdrawing from President Donald Trump's economic advisory council after Trump announced that he is pulling the United States out of the Paris climate change accord.

Elon Musk has a limit. Donald Trump just discovered it.

Musk announced on Twitter Wednesday that he will pull out of Trump's economic advisory council should the president go through with removing the U.S. from the Paris climate change accord. Under the agreement signed into effect in 2016, the 195 participating nations agree to curb carbon emissions and commit resources toward combating global warming.

The council includes leaders from the business world meant to advise the president on economic decisions. Musk had resisted pulling out in recent months despite mounting criticism.

Supporters of Tesla, which makes electric vehicles and solar panels, have been irked by Musk's close association with Trump, an oil and coal advocate who has repeatedly ignored science-backed evidence of global warming. Musk has maintained that remaining on the council gives him the chance to influence Trump's thinking on climate change issues.

Evidently, that may not be working. In an earlier tweet, Musk said that he had "done all I can" in advising the president and others in the White House. Multiple outlets reported Wednesday that Trump plans to pull out of the agreement, which has participation from the vast majority of the world's nations, including North Korea.

As he's previously done with significant announcements, Trump teased his decision on Twitter Wednesday morning: "I will be announcing my decision on the Paris Accord over the next few days," he wrote. "MAKE AMERICA GREAT AGAIN!"

The U.S. is the world's second largest contributor of greenhouse emissions, trailing only China. The participation of the world's biggest emitters has been critical to getting other countries to join the accord.

Notably, of the world's nine biggest emitters, the only country that has not ratified the agreement is Russia.

If he were to depart, Musk would be the second member of the 19-person council to do so. In February, Uber CEO Travis Kalanick removed himself due to mounting pressure from customers.