Elon Musk jumped to the defense of fellow tech billionaire Jack Dorsey late Monday, as the latter faces pressure from an activist investor to step down as the CEO of Twitter.

"Just want (to) say that I support @Jack as Twitter CEO," Musk, the chief of Tesla and SpaceX, said in a tweet. He added that he thinks Dorsey has a good heart, using the heart emoji.

Tweet

Musk's comments arrive after Paul Singer, the billionaire founder of hedge fund Elliott Management, built a stake in the microblogging platform in a bid to push for changes — including the removal of its boss.

CNBC has learned Elliott has a more than $1 billion stake in Twitter and has nominated four new board members. The company is known to often buy shares in large companies to have a say on issues like governance and strategy.

For example, Singer's activist fund recently bought into SoftBank, the Japanese tech investing juggernaut, seeking to have it repurchase up to $20 billion in stock and improve its governance practices. That was after the failed initial public offering of WeWork and amid general worries over SoftBank's bets on heavily lossmaking tech companies.

In Twitter's case, Singer is concerned by Dorsey splitting his time between running both Twitter and his financial technology firm Square. Dorsey's desire to move temporarily to Africa — which has already divided opinion among analysts — is another issue at hand in Elliott's aim to oust him.

Twitter shares rose nearly 8% on Monday as investors reacted to news of Elliott's stake in the company. The rally added more than $2 billion to Twitter's market capitalization, lifting it to $28 billion.

In its most recent quarterly earnings, Twitter reported its biggest-ever quarterly growth in users, but missed analysts' profit expectations.