Scottish government suspends some online adverts
The Scottish government has suspended some of its online advertising amid concerns that it may appear next to inappropriate material.
A spokesman for the Scottish government said it was putting its "current programmatic advertising" on hold.
YouTube owner Google said it would review its controls.
Programmatic advertising allows companies to target specific audiences with their digital adverts.
It means a father in his 30s might see adverts for children's toys, while a keen gardener might be targeted by horticultural companies.
But a recent investigation by the Times found adverts were appearing alongside content from supporters of extremist groups, making them around £6 per 1,000 viewers, as well as making money for the company.
The Scottish government told BBC Scotland it was taking steps to address the concerns.
'Gory or offensive content'
A spokesman said: "We strongly oppose all forms of extremism, intolerance and hate speech and take all steps possible to ensure our advertising appears in appropriate settings, including blacklisting and filtering out inappropriate websites.
"We have put our current programmatic advertising on hold until we are confident that this issue has been dealt with.
"We have also made it clear to the agencies who purchase advertising space on our behalf that we expect them to continue doing all they can to put robust barriers in place."
In a lengthy statement Google said it had "strict policies" which prevent adverts from appearing on websites with "hate speech, gory or offensive content".
But it added: "However, with millions of sites in our network and 400 hours of video uploaded to YouTube every minute, we recognize that we don't always get it right.
"In a very small percentage of cases, ads appear against content that violates our monetization policies. We promptly remove the ads in those instances, but we know we can and must do more."
The statement went on to say Google has begun a "thorough review" and it will be making changes in the coming weeks.