Proponents of Britain leaving the European Union often point to the Swiss experience as an instructive example of the benefits of life outside the EU. That’s not the way Caroline Vandevyver sees it.

When Switzerland decided to hold a referendum last year on mass immigration, Vandervyver, a biochemist who coordinates funding at the renowned École Polytechnique Fédérale de Lausanne (EPFL), was relaxed about the possible consequences.

But when a narrow majority approved the introduction of quotas and permits even for migrants from within the European Union – rupturing a longstanding agreement with Brussels – the knock-on effects were swift, and drastic.

“Certainly, few people here thought the outcome would have any major impact on their work,” said Vandevyver, a Belgian, sitting in a conference room on the school’s sleek, modernist campus on the city outskirts. “So what happened afterwards came as a big shock to many. The consequences have been quite dramatic. And depending on what happens now, they could get worse.”

For those who argue that a Brexit would have little impact on the UK’s world-leading universities since the government would simply cut a Swiss-style deal with Brussels, Switzerland’s post-referendum fright is an interesting case study. If you question the union’s core principles, it suggests, you can expect few favours.

In late 2013 the EPFL, among the world’s top 20 schools for basic sciences, engineering and technology, was readying for the imminent launch of Horizon 2020, the European Union’s new seven-year, €79bn (£56bn) science funding programme.

Though never an EU member, Switzerland had negotiated full “associated country” status for the previous EU programme, FP7, contributing to the pooled funding pot and – like Britain – doing very well out of it indeed: between 2007 and 2013, some 3,900 Swiss-based scientists won €1.7bn in EU grants.

A similar agreement for Horizon 2020 was drawn up and ready to sign by January 2014. But within a fortnight of the referendum, Brussels called it all off. Switzerland had, in effect, voted down one of the key tenets of the union: free movement.

“So we were out,” said Andreas Mortensen, a professor of materials science and EPFL’s vice-provost for research. “Relegated to ‘third country’ status in terms of EU funding. And in fact, the first reaction was quicker even than that: the day after the referendum, there were radio reports – imagine, hundreds of Swiss Erasmus exchange students, bags packed, tickets booked to Barcelona or wherever, suddenly excluded from the programme. It was an immensely powerful signal.”

A pedestrian passes an election poster in Lucerne opposing the rightwing Swiss People’s party’s proposal to reintroduce immigration quotas. Photograph: Walter Bieri/EPA

Working long hours of overtime, Swiss government and EU officials have since hammered out a temporary “partial association” deal so Swiss scientists can compete for about 30% of Horizon 2020 funding, including highly competitive – and hugely prestigious – European Research Council (ERC) grants. But for the remaining €55bn of the programme, including key investment for small businesses bringing innovative research to market, Switzerland remains a “third country” – treated like the US or Japan.

Brussels doesn't want - and can't afford – to compromise on fundamental principles Lionel Pousaz, EPFL

The Swiss National Science Foundation has stepped in with money, so – for the time being – no Swiss researchers have run short of funding. And universities across the country mostly succeeded in negotiating individual accords with the hundreds of European institutions welcoming their Erasmus students. But the EU’s move nonetheless came as a major shock to Switzerland’s renowned scientific community – and showed the extraordinary amount of extra administrative and fundraising work that exclusion from the bloc entails.

Plus, noted Vandevyver, the partial solution that has now been found is only short-term. “By law,” she said, “the government has to pass the result of the referendum into law within three years – by February 2017. If we don’t settle this question of free movement for the citizens of all EU member states before then, we’ll be back in full third-country status.”

Mortensen said there was “no reason to suppose” the EU would treat Britain any more kindly in the event of a Brexit vote. “We never joined the union, and we haven’t yet decided anything completely irrevocable,” he said. “There’s still room for manoeuvre. But you would be choosing divorce. Judging by how we were treated, I think Brussels would probably react even more strongly towards you.”

Lionel Pousaz, an EPFL staffer, was even blunter: “Brussels won’t negotiate on free movement. The EU doesn’t want – and can’t afford – to compromise on such a fundamental principle.”

What, concretely, have been the consequences of the Brussels decision for EPFL? The school’s communications director, Madeleine von Holzen, said it was too early to make a firm call. “For the time being, things are OK,” she said. “But the gap between the reality and the potential risk is still too big to quantify.”

Although a relatively young school, EPFL has climbed fast up the world academic rankings: in terms of ERC grants, awarded on the basis of scientific excellence, the 90-plus it currently holds rival the number at far better-known, longer-established institutions such as Oxford and Cambridge.

“Being kicked out of the ERC in particular, even temporarily, is a major blow,” said Mortensen. “You’re interviewing a top young professor, number one in his field. He may well have an ERC – it’s one of the best things you can have on your CV. But it, and the €1.5m it comes with, can only be used in the EU. How likely is he to come here now, if that means saying goodbye to his ERC? We’re cut off not only from the funding, but from the talent. It’s harder to recruit. The number of ERCs a university has is a huge yardstick for its success. If you can no longer attract the people who have them, you’re in big trouble.”

Academics at the École Polytechnique Fédérale de Lausanne were surprised at what exclusion from the bloc entailed.

Pousaz pointed to the school’s highly successful life sciences faculty, where half of the 40 laboratory heads currently hold ERCs. “The strategy was built on attracting the very best young researchers in their field, and our success at getting EU research funding was key,” he said. “ERCs are a vital component of the ecosystem that has made this school successful.”

As a result of the referendum debacle, EPFL missed two ERC application deadlines last year, Vandevyver said. Altogether, probably around 10 starting and so-called consolidator grants, for young and mid-career researchers, were lost. Some scientists were also forced to rush in applications earlier than they would have liked, almost certainly reducing their chances of success – something from which the school “will find it hard” to recover.

Shorn of EU funding, the school’s scientists have also lost access to a range of MSc and researcher mobility schemes that, while often “complex, bureaucratic – all that’s wrong with the EU, basically”, according to Mortensen, “are still really, really important for younger academics”.

And crucially, the country will play no part in defining the future shape of research funding: what fields most deserve investment, and with what means.

But ultimately, Mortensen added, the money was not the most important issue. “Most EU funding – except ERCs, which are all about competition – is one big mechanism facilitating and encouraging international collaboration,” he said. “We’re in one big European research area here. And that’s incredibly important in science: all the data, absolutely everything out there, shows conclusively that international collaboration produces better scientific work.”

Swiss science, Mortensen said, gained its reputation through being open. “Great infrastructure, sure; good resources. But very, very open.” He likened the effect of the Brussels decision to “being in a rally, and blowing a tyre. Imagine: you’re in the leading group, neck and neck, being pushed to the limit by your rivals but also collectively kind of blazing the trail, and – suddenly – you’re off the pace. Out of it.”