HBO is investigating a breach in their cyber security, after hackers took control of its social media accounts.

Several HBO Twitter accounts sent a message on Wednesday night purporting to be OurMine hackers, responsible for attacks on Netflix and Facebook creator Mark Zuckerberg.

Twitter accounts from shows such as Last Week Tonight with John Oliver, Veep and Vinyl all tweeted a message saying: "Hi, OurMine are here, we are just testing your security, HBO team please contact us to upgrade the security".

HBO regained control of the accounts within less than an hour, and is now investigating the hack.

OurMine is a group of hackers that claimed to have gained control of several social media accounts of important people, including Google's chief executive and the co-founder of Wikipedia.

The latest hack comes as HBO has been the victim of numerous attacks by hackers and inside leaks.

Last month, hackers going by the collective name Mr Smith stole 1.5 terabytes of data from HBO, resulting in several scripts, unaired episodes and other information being released online.

Since then, they have been trying to blackmail the network's CEO by releasing more batches of episodes, which include Larry David's Curb Your Enthusiasm and the Duplass brothers' Room 104.

It also included scripts from Game Of Thrones, but no actual episodes.

This week, four people were arrested in India in an unrelated case, where employees from a data company with access to Game Of Thrones episodes were accused of releasing them online.

On Tuesday, HBO Spain mistakenly made available next week's episodes of the show for an hour - enough for users to download it and release it online.

It was not immediately clear if Wednesday's Twitter hack was related to any previous attacks.