Tesla and SpaceX CEO Elon Musk bailed out as one of the White House’s top tech advisers Thursday after President Trump took America out of the Paris climate agreement.

“Am departing presidential councils,” Musk tweeted moments after Trump backed out of the climate accord.

“Climate change is real. Leaving Paris is not good for America or the world.”

The tech guru later tweeted a Scientific American article about climate change and challenged the US to do at least as much as China in fighting global warming.

“Under Paris deal, China committed to produce as much clean electricity by 2030 as the US does from all sources today,” Musk tweeted.

Musk made good on threats to leave Trump’s team if the president withdrew from Paris.

He had sat on two of Trump’s councils, an economic advisory board and the Manufacturing Jobs Initiative.