It seemed like an odd pairing from the start: Elon Musk, the brilliant South African immigrant who runs companies that build electric cars and lease solar panels to homeowners, and Donald Trump, the television-obsessed politician who repeatedly describes climate change as a hoax.

Musk joined the president’s advisory councils a month after the election last year, along with a band of high-profile tech executives. Trump’s election seemed like it could hurt those in the renewable-energy business, and Musk seemed to hop on board in part to get the president’s ear. It also helped that Trump supported partnerships between NASA and private spaceflight company’s like Musk’s SpaceX. The partnership seemed shaky from the beginning, with Musk criticizing Trump’s executive order banning immigration from seven predominantly Muslim nations.

On Wednesday, as rumors of the Trump administration’s decision to withdraw the United States from the Paris climate accord swirled, Musk said he was leaving the advisory councils over the move. On Thursday, after Trump announced the nation would indeed exit the agreement, Musk followed through on his promise: