Elon Musk said Thursday he will leave his positions on three presidential councils.

Musk’s decision follows an announcement from President Donald Trump that the U.S. will back out of the Paris climate accord.

Leaving the agreement is “not good for America or for the world,” the Tesla and Space X CEO said in a tweet.

Musk had served on councils advising the president on business, manufacturing jobs and infrastructure. He had defended his decision to serve the president, despite criticism. However, on Wednesday Musk warned he might quit if the president withdrew from the Paris Agreement.