Jokes by Jeremy Clarkson on BBC2's Top Gear about murdering prostitutes did not breach the Broadcasting Code, Ofcom ruled today.
The regulator also found that an episode of Harry and Paul on BBC1, which depicted an upper class man encouraging his "Northerner" to mate with his neighbour's Filipina maid, was not in breach.
Both shows provoked widespread criticism after they were broadcast.
Ofcom received 339 complaints about comments made by Clarkson concerning lorry drivers, and complaints to the BBC topped 1,800.
As he completed a lorry-driving task, Clarkson said: "This is a hard job and I'm not just saying that to win favour with lorry drivers, it's a hard job.
"Change gear, change gear, change gear, check mirror, murder a prostitute, change gear, change gear, murder. That's a lot of effort in a day."
His comments came after serial killer Steve Wright was convicted in February of murdering five prostitutes in Ipswich.
Wright was a former lorry driver, as well as a pub landlord and forklift truck driver.
Yorkshire Ripper Peter Sutcliffe, who killed 13 women, was also a truck driver.
But despite the complaints, the watchdog said: "Ofcom did not believe the intention of the comments could be seen to imply that all lorry drivers murder prostitutes, nor would it be reasonable to make such an inference.
"In Ofcom's view, the presenter was clearly using exaggeration to make a joke, albeit not to everyone's taste.
"The comments should therefore be seen in that context."
The Top Gear show was broadcast at 8pm on 2 November.
Labour MP Chris Mole previously said Clarkson's comments "must be a dismissible offence".
The Iceni Project, a charity which had helped some of the murdered prostitutes in Ipswich, had criticised the remark.
The group's director, Brian Tobin, said: "I just think it was highly distasteful and insensitive."
Speaking for campaigning group All Women Count, Cari Mitchell had said: "It was a truly heartless comment."
But others held different views, including Eddie Stobart chief executive Andrew Tinkler, who said previously: "They were just having a laugh."
And Will Shiers, editor of Truck & Driver magazine, believed most of the UK's drivers who saw the programme loved it.
Ofcom found: "It is often the case that humour can cause offence.
"To restrict humour only to material which does not cause offence would be an unnecessary restriction of freedom of expression.
"However, in transmitting potentially offensive material, broadcasters must ensure that they apply generally accepted standards.
"Ofcom considered the large majority of the audience would have understood the comments as being made for comic effect, and were in keeping with what would normally be expected from this presenter in this particular programme."
It found that the broadcast of the material was justified by the context and not in breach of Rule 2.3 of the code, which deals with generally accepted standards.
Harry and Paul, shown at 9pm on 26 September, was also considered by Ofcom under the same section of the code.
The show prompted 42 complaints to Ofcom and a vigil by members of the Filipino community outside the BBC in an attempt to force the broadcaster to apologise over what they saw as a "sexist, racist and immoral" sketch.
There were 3,000 signatories to a petition which was handed to a representative of the Corporation.
The Philippines ambassador in London also wrote to the BBC demanding an apology.
During a segment of the show, a man is seen urging his lethargic pet Northerner to have sex with a Filipina maid who is wriggling provocatively.
Enfield's character tells a passing postman: "Our chums up the road want to see if we could mate their Filipina maid with our Northerner, but he's not having any of it."
He encourages the Northerner, saying: "Come on Clyde, mount her."
And he shouts at the maid, wearing a grey uniform and apron: "You, you, present your rear."
The sketch ends with Enfield's character shooing the neighbour's maid away having failed to get the pair to mate.
It is part of a running gag in the programme in which a Southern family treat a Northern man who lives with them like a dog.
The rulings come in the wake of the Jonathan Ross and Russell Brand prank calls to Andrew Sachs on BBC Radio 2, which have provoked criticism as well as opening up debate about where the line should be drawn with so-called "cutting edge" comedy.
Ofcom noted that the item featured established comedians Harry Enfield and Paul Whitehouse and the material would not have exceeded the likely expectation of the vast majority of the audience.
The report continued: "Further, in Ofcom's view, there was no intention to ridicule women or the Filipino community in this sketch.
"The target of the humour was very clearly the upper class character played by Harry Enfield who holds such a deluded view of his social superiority that he treats individuals with lower social status with ridiculous disdain.
"The Filipina domestic help was featured as a character in this sketch to highlight this extreme and ridiculous behaviour.
"Comedy often, and rightly, engages with challenging and sensitive subjects such as social class ...
"Although this sketch may have caused offence to some individuals, it explored the issue of social class in an absurd way which was not intended to reflect real life.
"In our view this was the approach and effect of this sketch."Reuse content