The advert was shown in around 600 cinemas from January to March 2009
An advert showing a man pulling a dead rat out of his mouth did not breach the advertising code, a watchdog has ruled.
Sixty-four people complained about the cinema adverts, which were intended to highlight the danger of buying prescription drugs over the internet.
The Advertising Standards Authority (ASA) said that some people might find the images used by pharmaceutical giant Pfizer offensive or distressing.
But it said the advert's aim "justified the use of hard-hitting imagery."
The advert showed a man taking a tablet then shortly afterwards reaching into his mouth to pull out a dead rat by its tail before seeming to vomit into a sink.
The voice-over stated: "Rat poison. Just one of the dangerous ingredients that may be found in fake medicines purchased from illegal websites."
Most of the complainants said that the advert was unduly distressing and some found it offensive.
Pfizer said the advert was inspired by the case of a woman who died in 2006 after taking contaminated medicines bought online. The rat was chosen because rat poison had been found in some fake medicines.
The company said it wanted to raise awareness of a potentially life-threatening issue. It said studies suggest that between 50% and 90% of all prescription-only medicines bought online are counterfeit or substandard.
An important issue
The ASA agreed that the seriousness of the issue merited the approach Pfizer had chosen, even though the advert contained images that "some people might find offensive or distressing."
The authority acknowledged that, "without good reason, ads should not cause fear and distress or include shocking claims or images simply to attract attention."
But it found: "Because the ad was designed to highlight an important issue, the dangers of which could result in damage to health or in fatality, we considered the metaphor of regurgitating a rat was likely to justify, for most people, the approach."
It noted that because the advert was only shown with films rated 15 or above the number of young people who saw it was minimised.
The ASA did not uphold complaints that the advert was misleading or would particularly distress people who took legally prescribed medicines containing dangerous ingredients.
Dr David Gillen of Pfizer said: "We're really pleased with the adjudication.
"We set out to inform the public about the very real and growing threat from counterfeit medicines.
We certainly did not want to offend people, but the dangers of obtaining medicines from unregulated sources are very real and we needed to forcefully communicate that message."
Pfizer says its own research suggested that more than 330,000 men in the UK are likely to buy prescription-only medicine without a prescription from illicit websites every year.