The cable network HBO capped off several weeks of controversy and misfortune with further bad news on Friday when it emerged that the next episode of its star series, Game of Thrones, due to air on Sunday, had leaked on the internet that morning.

The online airing of the episode, in low-quality format, was apparently separate from the hack attack earlier in the week in which the episode’s script leaked after hackers breached HBO’s servers.

The mishap came amid continuing rows over HBO’s announcement that it is planning a drama series titled Confederate, set in the deep south, which imagines what America would have been like if the outcome of the civil war had been different and slavery had remained legal.

The Game of Thrones creators David Benioff and DB White teamed up to write Confederate, which they originally envisioned as a feature film but then decided to serialize on television instead.

The announcement marked a sharp sociopolitical contrast with Amazon’s revelation that it was also planning a post-civil war fiction series – one that imagines what might have happened if freed slaves had been given control of three southern states as reparations and turned the territory into a sovereign country, called New Colonia.

The leak of this Sunday’s Game of Thrones episode, the fourth in the current seventh season of the smash-hit show, which kicked off in July, came through the channel’s Indian distribution partner, Star India, the distributor confirmed to the Verge.

“We take this breach very seriously and have immediately initiated forensic investigations at our and the technology partner’s end to swiftly determine the cause. This is a grave issue and we are taking appropriate legal remedial action,” a Star India spokesperson said.

Game of Thrones has been hit by leaks and pirating in prior seasons, with unauthorized files being downloaded and shared millions of times.

Not long after episode three in the latest season of Game of Thrones aired last Sunday, reports sprung up that HBO had been the target of a major hacking incident, in which the following week’s script and advance episodes of other shows, including Ballers and Room 104, had been stolen.

Some journalists received emails last Sunday night, written in somewhat halting English, announcing “the greatest leak of cyber space era is happening” and urging the media to spread the word.

The message ended: “Whoever spreads well, we will have an interview with him. HBO is falling.”

HBO condemned the breach as disruptive, unsettling and disturbing and said the authorities were investigating.

On Friday, postings of the forthcoming episode itself turned up in a Reddit thread, in contrast with the earlier hacks, which only involved script material.

HBO had stopped the normal practice of sending out advance review screeners in the build-up to the latest season of Game of Thrones, in an effort to protect its content, but the channel was unable to prevent a week of security breaches.

The kerfuffle comes on the heels of a swelling grassroots campaign on social media to sink the Confederate project before it films and is expected to air in 2018, while others urged a wait-and-see approach.