Tesla and SpaceX CEO Elon Musk donated nearly $40K to Republican PAC, according to federal election filings.

Elon Musk defended himself in the face of widening criticism over money he sent to a Republican political-action committee, with the billionaire touting his support for environmental and humanitarian causes that he insisted outstripped his political contributions.

In news first reported by The Hill on Saturday, federal election filings showed that Tesla CEO and SpaceX founder sent nearly $40,000 to Protect the House, a GOP PAC designed to help Republicans maintain their tenuous congressional hold, as recent polling suggests Democrats could retake one or both chambers in the November midterm elections.

According to Open Secrets, Musk has distributed his wealth fairly evenly among politicians and PACs of both major parties, which he defended in principle in a series of posts on Twitter.

Musk, however, rejected suggestions of being a major GOP donor as "categorically false." A vocal supporter of environmental causes, Musk added that he was a political moderate who is primarily motivated by humanitarian issues — and that his political donations were a mere fraction of what he donates to supporting the environment.

Climate change, a cause Musk has long embraced, "affects every living creature on earth," Musk posted on Twitter.

Musk Tweet

Musk, who said he donated to Democrats and Republicans to "maintain an open dialogue," then retweeted support from the Sierra Club. A representative of the organization, which thanked him for his financial support, said Musk had contributed $6 million toward climate advocacy.

Sierra Club tweet

After President Donald Trump renounced U.S. support for the Paris Accord on global warming, Musk resigned in protest from a presidential advisory committee. Recently, the billionaire won praise by pledging to fund efforts to fix the ongoing water contamination efforts in Flint, Michigan.