Sony has apologised to developer Rockstar after hackers leaked details of the audio files online almost a month before the official release date.

The leak was made after hackers extracted the files from full copies of the game pre-downloaded from the European PlayStation Store.

Sony had allowed European customers to pre-order and download the game from the European PlayStation Store, but not to play it, in efforts to prevent server crashes.

Sony’s head of communications, Nick Caplain, said: "Regrettably, some people who downloaded the digital pre-order of Grand Theft Auto V through the PlayStation Store in Europe were able to access certain GTA V assets.

"We sincerely apologise to Rockstar and GTA fans across the world who were exposed to the spoiler content. GTA V is one of the most highly anticipated games of the year with a very passionate following, and we’re looking forward to a historic launch."

Rockstar, in a statement, said it was "deeply disappointed" by the leaks.

"Unfortunately some people who downloaded the digital pre-order of Grand Theft Auto 5 through the PlayStation Store in Europe were able to access certain GTA5 assets leading to leaked information and media from the game appearing online.

"GTA5 represents years of hard work by many people across the world, and we all couldn’t be more excited to finally share it with you properly this 17 September."

Rockstar added that it will not be revealing more about the game between now and GTA 5’s release.

Although the spoiler content has since been removed, the company’s PlayStation blog was also flooded with complaints.

One user said: "Thanks a lot, Sony, for spoiling the ending of GTA V before the game was even released."

Sony recently said the PlayStation 4 will be made available for $399 in the US and Canada on 15 November.