The legislation which aims to protect children more effectively from sexual abuse and exploitation when using webmail, chat and messaging services, was backed by MEPs, with 537 voting in favour, 133 against and 24 abstaining.
The European Parliament has voted in favour of temporary regulations that allow web-based service providers to continue detecting and reporting online material containing child sexual abuse.
The law, which will come into force once the European Council rubberstamps it in the next few days, is designed as an interim measure to allow businesses to report illegal content.
Changes at the end of 2020 to the bloc's privacy rules lead internet companies to stop voluntarily reporting material containing child sexual abuse, over concerns about breaking privacy laws.
The option remains voluntary to report, but suspicious material can once again be detected using technologies that scan images and texts.
"It remains as a voluntary procedure, but the main difference is twofold. The technologies can be used to detect not only already known child sexual abuse material, but also newly produced sexual abuse material and grooming, which implies the scanning of texts. That is a really groundbreaking step that we have taken," Spanish MEP Javier Zarzalejos told Euronews.
"And on the other hand, we introduce some extra safeguards in order to prevent any impact on privacy due to the processing of these data."
The new rules won't apply to audio communications, but privacy advocates say that isn't enough and that the regulations are too intrusive.
European Commissioner for Home Affairs Ylva Johansson insists the measures guarantee privacy and the protection of personal data.
"Data processed to detect child sexual abuse online is limited to what is necessary and is stored no longer than what is strictly necessary. Processing must be subject to human oversight and if necessary also to human review. These safeguards answer important concerns of the Parliament," Johansson told MEPs in Strasbourg.
"On top of this, companies will need to consult national data protection authorities if they use anti-grooming technologies or new technologies to detect material."
Aagje Ieven, Secretary-General of Missing Children Europe, says the organisation is pleased with the balance between protecting children and privacy but is disappointed with the time it took to come to an agreement, particularly given the rise in cases of abuse during the pandemic.
"There is respect for both. And the key points that we wanted as a child rights organisations are there, but we are very sorry it took so long and we have lost companies in the meantime," Ieven told Euronews.
"So for the last six months, children have gone unprotected. Child sexual abuse has been unseen. And knowing what the impact of child sexual abuse is on a child, it's a lifelong impact. Every child is one too many."
The measures will apply for a maximum of three years, but the Commission already intends to propose permanent measures later this year that could replace these new ones.
Commissioner Johansson has even hinted at making it obligatory for service providers to detect and report anything illegal.