An unusual event involving Twitter over the weekend had website users scratching their heads. While visiting websites with the regular 'Tweet' button installed, users were instead offered a torrent file to download. So, what was causing the issue and what was inside the mysterious torrent?

BitTorrent is most often associated with peer-to-peer file-sharing and the downloading of media such as music, movies and TV shows.

The protocol makes the headlines every week but some of its other skills go much more underreported.

In addition to its public file-sharing abilities, BitTorrent is a particularly useful tool for companies that need to shift large amounts of data around their networks. In 2010 it was revealed that Twitter had begun using the technology to deploy files across its many thousands of servers.

Codenamed ‘Murder’, the technology does not use the bandwidth of Twitter users but instead arranges the company’s servers into a BitTorrent swarm to efficiently distribute updates. But while this is a fantastic use of BitTorrent for Twitter, yesterday the company was associated with torrents in a way which had web users scratching their heads.

When visiting many webpages small widgets also load from external sites, things like buttons for Facebook, Twitter, Digg, LinkedIn and Google+1 for example. These normally load transparently and without issue but for some reason on many sites Twitter’s button began acting strangely yesterday.

Instead of loading the iframed HTML for the familiar blue ‘Tweet’ button, website visitors were offered a .torrent file, variously titled ‘widgets_tweet_button.html.torrent’ or ‘widgets-tweet_button.html.torrent’.

Of course, this strange behavior led many users to speculate that Twitter had been compromised. However, on closer inspection it became clear that the problem was almost certainly of Twitter’s making.

So what was the payload inside the mysterious torrent file? The HTML for Twitter’s button distributed using BitTorrent trackers hosted by Amazon, no less.

While few can doubt that BitTorrent is one of the most effect file-sharing methods on the Internet, this implementation must be the most inefficient yet.

It’s likely that this is just a simple error but when so many sites are affected and users left concerned, clarification is useful. TorrentFreak approached Twitter for a comment and we’ll update this article when we receive a response.