A protestor holds a placard reading reading Protection of sources, a pillard of democracy during a demonstration calling for the protection of journalists sources in Marseille, southern France, on October 3, 2023. AFP
The EU's Media Freedom Act was proposed by Brussels last year in the face of increased pressure facing journalists in countries such as Hungary and Poland.
The legislation is aimed at protecting reporters from political interference, allowing them to keep sources secret and ensuring media pluralism across the bloc.
The MEPs' vote stakes out the parliament's position on the draft law ahead of negotiations with the EU's 27 member states.
Among the most controversial issues are exemptions foreseen for using spyware against journalists.
Media activists have criticised EU states, led by France, for pushing to expand loopholes to allow authorities to spy on journalists in the name of "national security".
The parliament's position limits the use of spyware as a "last resort" when journalists were involved in serious crimes such as terrorism or human trafficking, and says a judge must give clearance.
That still falls short of a call by 80 media rights groups to vote for a total ban on using spyware against the press.
But Romanian MEP Ramona Strugariu -- one of the lawmakers in charge of the issue -- insisted it meant governments were "effectively banned" from using spyware to probe the work of journalists.
Media watchdog Reporters Without Borders backed the lawmakers' clarifications and called on EU countries to follow their lead.
The issue has been put in the spotlight by a furore in France over the two-day detention last month of investigative journalist Ariane Lavrilleux for reporting on leaked documents claiming French intelligence was used to target civilians in Egypt.
Journalist groups decried an attack on press freedom after Lavrilleux's home was searched and she was arrested for questioning by agents of France's domestic intelligence agency.
Lavrilleux has decried the EU legislation as "one of the worst freedom-killing laws" in the parliament's history.
Another crucial -- and disputed -- part of the draft law concerns the moderation and possible deletion of journalistic content by online platforms.
To avoid handing too much power to the internet giants, the law envisions setting tougher conditions for removing or restricting reports by media outlets.
To meet that bar, the journalists must meet criteria such as being transparent about their ownership and be editorially independent.
If a verified outlet is deemed to violate a platform's rules of use, it will get 24 hours to defend itself before anything can be done.
French MEP Geoffroy Didier said that would "consolidate freedom of expression" by stopping the likes of X, formerly Twitter, from deleting journalists' accounts.
But big tech lobby, the Computer and Communications Industry Association, complained it "erroneously introduces a loophole that rogue actors can abuse to falsely pose as media outlets and disseminate fake news".