Parts of the source code which underpins social media platform Twitter have been leaked online.

Twitter says the code was posted on GitHub, a Microsoft-owned service where software developers share code.

It has now been taken down after Twitter requested its removal.

Separately, Twitter’s multi-billionaire owner, Elon Musk has reportedly signalled to his workers that the firm is worth less than half the 44-billion dollars he paid for it last year.

A GitHub spokesperson told the BBC that it does not generally comment on decisions to remove content.

However, in the interest of transparency, GitHub said it shared every DMCA [Digital Millennium Copyright Act] takedown request publicly.

The DMCA was signed into law in the US in 1998. It is aimed at protecting copyrighted material on the internet.

In the takedown request, Twitter called on GitHub to provide information on who was behind the account which leaked the code – named FreeSpeechEnthusiast.

San Francisco-based Twitter said in the filing, that the account had infringed copyrights owned by the company.

The leak creates a new challenge for Mr Musk, who has slashed Twitter’s workforce by more than a third and faced an exodus of advertisers since buying the platform in October last year.