I was in Mosul, the Islamic State group’s former capital in northern Iraq, on a reporting assignment about children returning to a school that had been shut down for three years by jihadists. I was thinking of how best to describe the joy of those children as they returned to their long-forbidden desks in that ruined city.

Sitting at a restaurant with the photographer, video journalist and driver before heading back to Baghdad, I read an article on my laptop about the EU debate on plans for a “neighbouring rights” law which would apply to the media. The report did not come as a shock.

After five years crossing a war-shattered Syria where I narrowly escaped being killed by snipers’ bullets or gunners’ shells, I had just arrived back in Iraq for the third time since the US invasion of 2003.

Last chance to fill in the blanks on funding journalism’s future | Roy Greenslade Read more

In more than 40 years of reporting, I have seen the number of reporters on the ground steadily decrease as the dangers relentlessly grow. We have become targets and our reporting missions cost more and more. Gone are the days when I could go to war in a jacket, or shirtsleeves, an ID card in my pocket, along with a photographer or a video journalist. Now you need bullet-proof vests, armoured cars, sometimes bodyguards, and insurance. Who pays? The media pays, and it is a heavy cost.

Yet, even though they pay for the content and send the journalists who will risk their lives to deliver a reliable, complete, trusted and diverse news service, it is not the news organisations who reap the profits but internet platforms, which help themselves to our reporting without paying a cent. This is morally and democratically unjustifiable.

So many friends have stopped reporting because their news organisations have closed or can no longer pay them. Until these journalists put away their pens and cameras, we shared the terrible fear of hiding behind a wall that trembled as intensely we did from the impact of explosions; the indescribable joy when we succeeded, when we could tell the world the “truth” that we had seen with our own eyes; the extraordinary meetings with warlords and the heavily armed guards who smiled as they toyed with their pistols or daggers, watching as we interviewed their bosses; the poignant sorrow when faced with dazed, trapped civilians, the women awkwardly protecting their children as bullets scraped the walls of the shelter in which they had found brief refuge.

The media have endured a lot of pain for a long time before reacting to the financial drain, struggling with the consequences rather than the cause. They have laid off staff almost to the point of absurdity. Now they are demanding that their rights are respected so they can carry on reporting the news. They are simply asking that the sales revenue is shared with those who produce the content, whether they are artists or journalists. This is the meaning of “neighbouring rights”.

We can no longer swallow the lie spread by Google and Facebook that an EU directive on such rights would threaten people’s ability to access the internet for free. Free access to the web will endure because the internet giants, which now use editorial content for free, can reimburse the media without asking consumers to pay.

Difficult? Impossible? Not at all. Facebook made $16bn in profits in 2017 and Alphabet (Google’s parent company) $12.7bn. They simply have to pay their dues. That is how the media will survive and the internet titans will be contributing to the diversity and freedom of the press they claim to support.

Mosul six months after Isis was ousted – then and now Read more

I am convinced that MEPs who have been misled by lobbying now understand that unpaid access to the internet is not at risk. At stake is the freedom of the press, because when newspapers run out of journalists, that freedom (which is supported by politicians on all sides) will be gone.

Countless times I have been face-to-face with people who were blockaded, isolated and defenceless, who asked just one thing: “Tell people what you have seen. Then we have a chance of being saved.” Should I reply: “No, do not raise your hopes. We are the last journalists. Soon there will be none left because of a lack of money”?

Remember that Facebook and Google employ no journalists and produce no editorial content. But they get paid for the advertising linked to content that journalists produce.

Every day, journalists investigate all aspects of life so they can inform their fellow citizens. Every year, prizes are awarded to the most courageous, intrepid, talented journalists. We cannot allow this fleecing of the media of their rightful revenue to culminate in a day without prizes, for lack of candidates with the means to report on the ground.

It is time to act. The European parliament must vote massively in favour of “neighbouring rights” for the survival of democracy and the journalism that is one of its most remarkable symbols.

• Sammy Ketz is AFP Baghdad bureau chief