RT @newsontv3: Hugh Masekela was a good friend. He put Africa on the world map for Jazz music, and I respect him highly. Teddy Osei of Osi…
Last month, a court granted an injunction to stop graphic images of Brazilian singer Cristiano Araujo, who died in a car crash on 24 June, being shared online.
Images of the crash site and his body in a morgue had been posted on the web.
On Tuesday, a judge ruled Facebook and Google had ignored the ban.
Judge Denise Gondim de Medonca said the companies had acted in "bad faith" by failing to remove links to the content.
The injunction was originally granted on 25 June. Judge William Fabian said posting the material online showed "worrying morbidness that is extremely disrespectful".
He called for "an immediate stop of the dissemination of such degrading images on the worldwide computer web".
Companies that failed to comply with the ban faced fines of 10,000 Real (£2,000) a day.
'Depictions of death'
The BBC has contacted Facebook and Google but the companies have yet to respond.
Facebook's community guidelines say it allows some graphic images but removes those "shared for sadistic pleasure".
Google's removal policies say it removes "offensive images" including "depictions of death".
In 2012, the Delhi High Court, in India, asked Facebook and Google to "develop a mechanism to keep a check and remove offensive and objectionable material from their web pages".
The court threatened to block the websites in India if they failed to comply. Both sites agreed to the court's directive.