Warner Bros has been rebuked after an advert for one of its horror movies was played during a Spotify playlist of children's lullabies.
The advert for the film It: Chapter Two featured the voice of killer clown Pennywise talking and giggling over scary music.
It ran in August although it had been tagged as unsuitable for "kids' music".
The Advertising Standards Authority (ASA) said Warner must take further steps to prevent a similar incident.
Spotify did not respond to the BBC's request to explain why it had not blocked the advert.
But the UK's advertising watchdog said that the music streaming firm had told it "they did not believe the playlist was designed primarily for children".
Even so, the regulator noted the technology company had now removed the list from its platform.
"As streaming services become ever more mainstream, I suspect they'll face a number of new challenges like this one," commented Chris Cooke, managing director of music business consultancy CMU Insights.
"While it's reasonable to say that Spotify's advertising technology should keep unsuitable ads away from playlists overtly aimed at children, are we saying it should also look for playlists that have the sort of music that might make them popular for children?
"That said, Spotify is already making moves in this space by launching a specific kids version of its app for premium users. Maybe it needs to apply some of that functionality to its [advert-supported] free service too."
The playlist in question was titled "Classical Lullabies", and had been curated by Spotify itself.
It included songs whose titles included the phrases:
- Children's Music
- For Children
- English Nursery Tunes
On this basis, the ASA said that it considered the list was indeed "designed primarily" to be listened to by young children, despite Spotify's denial.
The 30-second advert featured the distorted voice of It's villain. The character, created by the writer Stephen King, had terrorised a group of children in the first movie, and describes his desire to return, while indistinct whispers play in the background.
"For 27 years, I dreamt of you. I craved you. Oh, I missed you," he says, before a siren, drums and other discordant sound effects are played.
The regulator said that it believed this was likely to distress young audiences.
Warner said that it had directed the advert to be targeted at 18 to 44-year-olds and had also marked it as being unsuitable for children.
In response, the advertising watchdog acknowledged that the film distributor had taken steps to behave responsibly.
But since this had not prevented children from hearing the advert, the ASA still judged it to be "inappropriately targeted".
"We expect advertisers, and the platforms on which their ads are served, to ensure children aren't targeted by inappropriate or irresponsible content," it said.
It added that its rules also applied to ads played within user-curated playlists.
The body does not have the power to impose fines, but it can demand repeat offenders provide it with their marketing materials to check them before use, among other sanctions.