Elon Musk and Mark Zuckerberg have clashed on artificial intelligence, space travel and the direction of technology.

On Friday, Mr. Musk showed just how little love lost there was between the two tech titans.

Mr. Musk, the chief executive of SpaceX and Tesla, deleted the Facebook pages of both of his companies. In doing so, he joined a growing chorus of tech leaders calling for people to abandon Mr. Zuckerberg’s social network after it allowed a political consulting firm, Cambridge Analytica, to obtain and misuse data on 50 million users. The revelations have plunged Facebook into its worst public relations crisis in years.

As with most news in 2018, Mr. Musk’s decision started with a barrage of tweets.

The tech luminary began by criticizing Sonos, a maker of wireless speakers, which had pulled some ads from Facebook for a week.

“Wow, a whole week. Risky ...,” Mr. Musk tweeted in response to a news article about Sonos’s move.

A minute later, he replied to Brian Acton, the founder of WhatsApp, which Facebook had acquired for $19 billion several years ago. Mr. Acton, who has since left Facebook, had on Wednesday called for people to “#deletefacebook.”