Martin Rees is a cosmologist and astrophysicist who has been the astronomer royal since 1995. He is also a co-founder of the Centre for the Study of Existential Risk, Cambridge. His most recent book, On the Future: Prospects for Humanity, is published by Princeton.

After Boris Johnson’s recent announcement of an increase in the number of special visas for scientists, Sir Andre Geim accused him of taking scientists “for fools”. Did you feel patronised by the announcement?

I wouldn’t put it that way. Anything that makes it easier to get visas is welcome but won’t remove the serious downsides of Brexit.

So you agree with Sir Andre that the turmoil will last for many years and that issuing a few more visas isn’t really the answer?

The main point is that science is truly global, straddles all boundaries of nationality and faith. So anything that makes the UK less welcoming to scientists around the world is going to have a negative impact.

Why should the passenger on the Clapham omnibus care about the situation of science post-Brexit?

Because science is not just a venture for academics – most of our life depends on how it’s applied. The UK is specially strong in scientific expertise and in its universities – it would be deeply damaging to jeopardise this strength.

A Brexiter would say you are part of an elite protecting vested interests.

Well, it’s very odd of people such as Jacob Rees-Mogg to refer to their opponents as an elite. As a university teacher, I think the whole country ought to care about the quality of our hi-tech industry and our education. And most young voters are anti-Brexit.

Would you say the only group of scientists who are more relaxed about Brexit are working on GM foods?

That is true – many of us feel that the EU regulations on GM are over-stringent. But even from that perspective it’s not clear you’re better off out than in. We want to sell our stuff in the EU, so we’d be better placed to do that if we were inside and could influence the regulations rather than having those regulations imposed on us and inhibiting our trade.

Technology played a disputed role in the outcome of the referendum. At the Centre for the Study of Existential Risk, you study some of the potential impacts for humanity of speedy technological change…

One consequence of modern technology is that the world is more interconnected. It’s possible for small groups or even individuals to produce an effect that cascades very widely, even globally.

I hope manned space flight will continue, but as a high-risk adventure bankrolled by private companies

But doesn’t that interconnectedness mean we’re able to monitor what’s going on around the world?

The International Atomic Energy Agency can monitor compliance with nuclear regulation. But we have minimal success in enforcing drug or tax laws globally. Regulations of cyber and biotech will likewise be harder to enforce because, unlike the nuclear case, they don’t require conspicuous special-purpose facilities. We may have a bumpy ride because we can’t eliminate these threats completely.

The climate crisis is another area where international agreements have had limited impact. There is a strong grassroots movement led by Greta Thunberg and others, yet we have populist presidents in the US and Brazil who are climate-change deniers and reneging on agreements…

Politicians don’t prioritise things when the benefits are diffuse and in the far future. They will only take action if the voters are behind them. That’s why it’s very important to sustain these campaigns.

We want to make sure that these issues of climate stay on the agenda. For instance, the 2015 papal encyclical on climate change. The pope has a billion followers from Latin America, Africa, East Asia and this helped towards consensus at the Paris conference.

To take a more parochial example, we have to give some credit to Michael Gove, who introduced legislation against non-reusable plastics. However, he wouldn’t have done that had it not been for the influence of our secular pope David Attenborough, who introduced us to Blue Planet footage of albatrosses coughing up plastic and so on.

Is climate change the threat that you’re most concerned about?

The most worrying thing on a 10- or 20-year timescale is the misuse of cyber- and biotechnology.

Are the dangers from rogue individuals or rogue states?

I think both, and error as well as terror. We are so dependent on the electricity grid that the lights going out are the least of the problems. A 2012 report from the US Department of Defense says a cyber-attack from another state that downs the grid in the eastern US would merit a nuclear response.

Society is getting more fragile and vulnerable. To take another example, if there is a pandemic, hospitals would be overwhelmed before the number of cases reached 1% of the population, leading to a breakdown in social order.

Were you heartened by the amount of interest in the 50th anniversary of the moon landing?

That was an extraordinary feat. But once the US had achieved their mission of beating the Russians to the moon there was no motive to continue with that level of government expenditure.

The need for sending people into space has evaporated. If you were building the Hubble telescope now, you wouldn’t send people to refurbish it, you would send robots. I hope human space flight will continue, but as a high-risk adventure bankrolled by private companies. If I were American, I wouldn’t support taxpayers’ money going on Nasa’s manned programme. But I would cheer on Messrs Musk and Bezos with their companies SpaceX and Blue Origin. And perhaps by the end of the century a few adventurers will be living on Mars. Musk has said he wants to “die on Mars, but just not on impact” and that’s not a crazy aspiration.

But it is a delusion to think we can solve Earth’s problems by relocating to Mars. I completely disagree with Musk and with my late colleague Stephen Hawking on that, because dealing with climate change on Earth is a doddle compared with terraforming Mars.

Do you think we should be concerned about artificial intelligence?

I don’t worry yet about a general intelligence that invades the internet of things and takes over the world – that still seems to be science fiction.

But AI and robotics are affecting the labour market and lots of jobs will be replaced or supplemented by AI. These will include work in call centres and warehouses. But that would be good news if the people displaced could find work where the human element is crucial, such as caring for the old, the young and the vulnerable. There are too few such jobs now and they’re insecure and poorly paid. Those who employ robots need to be taxed and that funding should be used to set up huge numbers of dignified and secure jobs of the kind a humane society needs.

Lord Rees is speaking at HowTheLightGetsIn London which takes place on 21 and 22 September at Kenwood House, north-west London. The Observer is a media partner of the festival