A few days ago, BBC reporter Lauren Moss was attacked moments before she went on air. A man screaming abuse hurled his hot chocolate on her saying he hated the BBC. This anti-media and anti-BBC feeling is all over social media and goes all the way to No 10, with its hints that not only will non-payment of the license fee be decriminalised but it could be scrapped altogether. But instead of joining in the pile-on, we need to be advocating for and defending free media, and especially the BBC. Because for all of its imperfections, it is based on a licence fee that provides it with the basis to speak truth to power.

The Tories are trying to create a culture war to avoid scrutiny, and right now they are winning it. The end point would be a disaster, a hyper-partisan news landscape dominated by commercial and not the public interest. It’s not just the BBC that we need to worry about. The media is under attack like never before. As ministers boycott news channels at their choosing, the Prime Minister avoids press conferences in favour of pre-screened questions from the public, and Downing Street excludes selected journalists from briefings. All to sow the seeds of division and to undermine what should be the central job of our reporters: to get to the truth. These Trumpian tactics show a need to stifle dissent and expose how little confidence the government has in its own arguments.

The threat to our news media is about more than the political climate. The rise of online media and falling ad revenues is hitting our most trusted sources of information hardest: local and regional news. The papers and programmes that broke stories that shape this nation, from Granada Television, which was part of the 20 year battle to get justice for the Hillsborough families to the Yorkshire Post exposing the crisis in our NHS at the last election.

Brave, persistent and challenging journalism is what we must fight for over the coming years. It is what will keep our democracy alive. That tells the truth about what is happening across the country. It is what journalism should be, and what many national and local journalists aspire to. The BBC’s Victoria Derbyshire covers issues that are too often overlooked, like the impact of the family courts on children and parents across the country. Channel 4’s Simon Israel has exposed conditions in immigration detention centres and returns to this time and again; journalists like Ros Wynne Jones are tireless in documenting the real impact of austerity and ensuring the most marginalised have a voice.

But to survive, news reporting needs an honest reckoning with the habits of the recent past. At a time when so many issues divide and polarise us, we need news media that does not play into these dividing lines. Being impartial does not mean being neutral. As CNN journalist Christiane Amanpour remarked on covering the genocide in Kosovo the job is to be truthful, not neutral. Impartiality shouldn’t mean giving equal weight to climate change science and climate sceptics or repeating misleading claims and dubious figures about the NHS.

If we are going to defend our news from attack, it must do better to reflect the people it serves. That means breaking out of the cozy club created by Westminster journalists and politicians, engaging in a small conversation and pretending it is a national debate. While efforts have been made – notably by the BBC and Channel 4 – to move out of London, the commissioning power that decides what is made and when it is shown still sits behind the same desk in central London.

As Labour Prime Minister, I would propose a new settlement with our news media. To protect its voice, and ensure it represents the whole of the UK. My Labour government would tax social media companies to create a fund to support local media and investigative journalism, building on the local democracy reporters scheme. I would protect the license fee and my government would not hold the BBC to ransom over appointments and funding. Alongside this I would support measures to make news media more accountable to the people it serves, including exploring mutualisation of parts of the corporation.

To maintain the BBC as an institution, it must be accountable to those who fund it – the British people. Instead of tokenistic consultation with the people who pay for it, and backroom negotiations with the government, the BBC should move to a model of being owned and directed by licence fee holders – who can help decide the trade-offs that the BBC must make to secure its future. This will mean a new structure for the BBC board that focuses on genuine public representation and participation – and greater commitments to transparency. This will support greater independence from the government, and protection from the Trump-like assault on free and open media that this government wants to pursue.

It is time for all of us to be more forceful in supporting a free and open media. Because if we don’t fight for it, we will lose it and we will all be damaged as a result. That is my commitment as a Labour leader who will face the same partisan attacks from sections of the media that have attacked every Labour leader in history. To stand up for a media landscape that is plural, representative and accountable to people covering the issues that they care about – however uncomfortable for me or the government I lead. That is the mark of a good government, unafraid of challenge, confident enough to accept that nobody has the monopoly on wisdom, open and willing to change.