Canadians watching a Friday morning TV news broadcast were shocked when the program was replaced on their screens with hardcore gay pornography.

The unscheduled change in broadcasting -- which affected CHCH-TV in Hamilton, Ontario -- was due to an error by a cable provider, the National Post reported.

Screens switched unexpectedly at 9:30am for viewers who were watching CHCH through Cogeco and Shaw cable networks. As well as homes, the adult content was broadcast into gyms and cafes showing the news.

"It felt like an eternity but I think it was on there for about a minute," said Mike Katrycz, the vice-president of news at CHCH. "We discovered through quick investigation that ... it was one of the cable companies that had patched it. It was beyond our control."

Shocked viewers complained to the station and #chch was soon trending on Twitter.

"We have been doing a lot of apologizing this morning," Katrycz said.

In almost identical circumstances about a week earlier, an error by Comcast led to pornography being shown instead of "Good Morning America" on KRDO-TV in Colorado. However, in that instance the footage was shown for only a few seconds, the New York Daily News reported.