EU lawmakers on Tuesday adopted new rules on political advertising that seek to bolster protection from foreign interference in European elections.
The European Union believes the law will make it easier for citizens to recognise political ads, who made them and whether they are targeted advertisements.
Countries outside the EU will be banned from paying for political advertising in the bloc in the three months before an election or referendum.
The rules also ban the use of personal data, like ethnicity, religion or sexual orientation for political advertising as well as minors' data.
The lawmaker who spearheaded the text through parliament, Sandro Gozi, said the EU was "taking action to strengthen the defence of our freedoms and personal data, to increase the transparency of electoral campaigns, particularly online".
The rules would also "strengthen actions against those who want to manipulate democratic processes", Gozi said during a debate on Monday.
The law will apply 18 months after it is formally adopted by both the parliament and EU states but some elements will come into force in time for the June 6-9 EU elections.
In the lead up to the polls, individuals and groups will be allowed to advertise across the bloc's borders, meaning they are not limited to just one country as before.
A majority of lawmakers backed the law after negotiators from the parliament and the EU's 27 member states hammered out an agreement in November last year.
The changes are part of an update of regulations proposed in 2021 after Facebook's Cambridge Analytica scandal, which saw millions of users' data harvested for political research without their consent.
The law demands that online platforms flag content as political advertising.
It also says personal data explicitly given for online political advertising and collected from the individual can be used by providers to target users.
The European Commission will also set up a publicly accessible database listing all online political advertisements for a maximum of seven years.
Since the rules will not apply right away, the commission has produced a series of guidelines for the world's biggest online platforms, as part of its landmark Digital Services Act, to try to encourage voluntary compliance ahead of the June polls.
The commission recommends platforms "clearly" label content "in an efficient and visible way" to make sure users know it contains political advertising.