US drama Homeland tells the story of Sergeant Nicolas Brody, who returns as an American hero after eight years in captivity in Iraq, but CIA officer Carrie Mathison begins to suspect that he may have links to an Al-Qaeda terrorist plot against America.
In the episode from Season One aired on Channel 4 on March 4, a sex scene was shown just seven minutes after the 9pm watershed between Prince Farid of Saudi Arabia and his girlfriend Lynne, who unbeknownst to the Prince was spying on him for the CIA.
Then the opening credits for the episode shown on April 8 featured Sergeant Brody and Carrie Mathison both saying the word "f**k", which Ofcom noted was "clearly audible" to viewers.
On both occasions, the complainants were concerned that the potentially offensive content was aired very close to the watershed when children may have just stopped viewing.
Ofcom's rules state that "the transition to more adult material must not be unduly abrupt at the watershed (in the case of television)... For television the strongest material should appear later in the schedule".
But Channel 4 said that the sex scene was "editorially justified" because it illustrated the nature of the relationship between Lynne and the Prince, as she was sexually subservient to him and risked being killed if he discovered she was working for the CIA.
The broadcaster also noted that the episode was preceded by a clear warning stating: "Now on 4 tonight Homeland which contains nudity, sexual scenes and strong language from the very start and throughout."
Channel 4 said that the swearing in the show's opening credits was also justified as it helped reflect Sergeant Brody and Carrie Mathison's characters. The broadcaster said that again, it warned viewers to expect "strong language from the very start" of the episode.
In a statement today, Ofcom said that its rules on the watershed transition were "not prescriptive", as each case is taken on whether the content was editorially justified.
The regulator said that the consensual sex scene lasted 18 seconds and did show Lynne's naked breasts, but no other nudity was involved as the couple were covered by sheets.
After it was over and the Prince left the room, the scene depicted Lynne downloading material from his phone at "great peril to herself". Overall, Ofcom felt that the scene was justified by its context, while viewers were also clearly warned about the coming content.
It was further noted that Homeland's first season had previously featured much stronger sex scenes, such as the one between Sergeant Brody and his wife in the debut programme.
Discussing the use of the word "f**k" at 50 and 53 seconds in Homeland's credits on April 8, Ofcom said that this was justified by the editorial context and would not have exceeded viewer's expectations for the series and broadcaster.
Ofcom also noted that both uses of the word were not directed at another character, which in fact lessened their potential to offend most viewers.
"Our research suggests that audiences find strong language more offensive when directed at an individual," said Ofcom.
Channel 4 will air Season Two of Homeland in the autumn.