This is no lie, nor even columnist’s hyperbole: the UK’s referendum decision to leave the European Union felt like a bereavement. On the morning after the fateful vote, my overriding emotion was despair for a country that had chosen to turn away from the benefits of partnership and collaboration.

Many scientists feel the same way. From universities and learned societies, to medical research charities and industry groups, the message was clear: this is very bad news for science.

The UK received about €8.8 billion (£6.7 billion) in EU funding for research, development and innovation between 2007 and 2013, including 16% of universities’ research funding. Membership of the EU has helped to put UK scientists at the heart of international research collaborations, consistently raising the quality and impact of their research. More than 200,000 UK students have been able to study in other EU countries thanks to Europe’s Erasmus scheme.

The referendum result puts these success stories in jeopardy. And even though the leave campaign explicitly said that the government would make up any funding shortfall, one only has to look at the current political chaos – along with the sound of promises being smashed – to be deeply skeptical that this will come to pass.

Since the referendum result, we have seen protests and petitions calling for a second referendum or a general election, and the beginnings of a legal challenge that would force a parliamentary vote before proceeding with Brexit. I don’t have high hopes for any of these moves.

That means scientists must act on the assumption that the UK is leaving the EU, even if that formal process does not begin any time soon. The key question now is what sort of Brexit we will get. And on that score, science still has a lot to fight for.

Part of the club

Non-EU countries like Norway and Switzerland, which are part of the European Free Trade Association, pay a contribution to gain access to EU funding schemes like Horizon 2020, although they have little influence on its priorities. A similar deal for the UK may only be possible if it accepts free movement of EU citizens, something that is anathema to many leave campaigners. Researchers must lobby hard to ensure that the UK remains a full participant in Horizon 2020, and persuade politicians to accept the compromises that might entail.

Just look at Switzerland. It voted to restrict freedom of movement in 2014, and promptly found itself shut out of Horizon 2020. A temporary deal that pays for scientists to take part in some aspects of Horizon 2020 will expire if Switzerland does not agree to freedom of movement by February 2017. That would be disastrous for Swiss scientists. Yet they would be more insulated from the shock than the UK: Switzerland spends 3% of its GDP on R&D, whereas the UK spends only 1.7%. The UK government must increase that percentage, to counteract the negative impact of EU withdrawal.

It should also provide incentives to preserve industry’s R&D spending in the face of a looming economic slowdown. Pre-referendum uncertainty has already cost investment opportunities, and this will only intensify unless government commits more time and money to attracting innovation-led businesses.

Meanwhile, the London-based European Medicines Agency will probably have to relocate, which may impact clinical trial activity and broader drug development efforts in the UK. And London may no longer host the planned chemistry and pharmaceuticals division of the EU’s new ‘unitary patent’, which was set to launch next year. The government needs specific strategies to mitigate the impact of these losses.

Cry of anger

EU consortia may be wary about including UK researchers, fearing that they might be unable to participate if negotiations produce a particularly harsh Brexit. The UK’s universities and science minister Jo Johnson has asked researchers to tell him about any examples of UK groups being shut out of EU collaborations. You should not hesitate to do so.

Indeed, every single researcher should write to their MP, urging them to argue for a Brexit that retains all that is fruitful about our international science relations. The House of Commons Science and Technology Committee is already gathering evidence on the implications and opportunities of leaving the EU; universities and learned societies must engage with that, and help the committee to present a clear case for safeguarding science in the negotiations.

Whatever the intention of leave voters, they have given a clear signal that the UK is pulling up the drawbridge, potentially discouraging foreign researchers from coming here. The appalling spike in racist incidents since the referendum will surely act as a further deterrent. So researchers must reassure lab colleagues from abroad that they are vital to this country’s future. They should do all they can to strengthen their collaborations with colleagues in EU countries, and continue to apply for EU funds. This will help to counteract the barriers thrown up by Brexit, and could strengthen the argument for a Brexit that minimises the damage to these arrangements.

The referendum vote is widely seen as a cry of anger from disenfranchised parts of the UK that believe they have not benefitted from globalisation. It’s a harsh reminder of how important it is to communicate the benefits of research – and international collaboration more generally – to the public, and to the politicians who are about to decide our fate in Europe.