A power struggle over who will become the permanent head of the National Aeronautics and Space Administration is spilling into the public, with Elon Musk attacking the acting administrator, Sean Duffy, the transportation secretary.

Mr. Duffy has been running the space agency since July but his appointment runs out at the end of the year. President Trump initially nominated billionaire Jared Isaacman, a confidant of Mr. Musk, for the role at the start of his administration but suddenly withdrew the nomination in July after Mr. Musk’s messy exit from the administration.

Now it appears that both men are attempting to become the administrator. Supporters of both have been calling contacts in the Trump administration to make their pushes, the Wall Street Journal reports, while noting that Mr. Duffy and his staff interviewed Mr. Isaacman this week ahead of a possible nomination.

It is unclear if Mr. Musk is among those making calls but he hailed Mr. Trump’s initial nomination of Mr. Isaacman and shared his nomination announcement on X, writing, “Congratulations.”

Now Mr. Musk is insulting Mr. Duffy in a series of posts on his X account. In one post he claimed Mr. Duffy has a “2 Digit IQ.”

Mr. Musk also posted a poll on his X account asking, “Should someone whose biggest claim to fame is climbing trees be running America’s space program?” The post references Mr. Duffy’s history of winning tree-climbing speed competitions.

The poll came after Mr. Duffy went on Fox News and said SpaceX, which Mr. Musk runs, has fallen behind in its efforts to develop the Starship as a lunar lander and could be dropped as a contractor for the upcoming Artemis moon mission.

Mr. Duffy posted a video of his comments on his X account with the caption: “A little COMPETITION doesn’t hurt and it spurs INNOVATION!”

Mr. Musk responded to the post: “SpaceX is moving like lightning compared to the rest of the space industry. Moreover, Starship will end up doing the whole Moon mission. Mark my words.”

“Sean Dummy is trying to kill NASA!” Mr. Musk later posted on X in reaction to the Journal report on Mr. Duffy’s interest in becoming the permanent head of NASA.

As for Mr. Isaacman, he told Journal that he has never expressed confidence about being renominated for the role.