When the first national lockdown was announced in March last year, there was an immediate concern from professionals and lay people alike: this is going to be terrible for people’s mental health. As lockdowns dragged on into this year, and some emergent data backed up the initial concerns, the clamour grew louder. The mental health effects became fuel for lockdown sceptics around the world, including in the UK and the US.

Now, as England debates the final steps to freedom, the new health secretary, Sajid Javid, has cited mental health concerns as a reason why the country needs to open up. The benefit of restrictions, the argument goes, is simply not worth the psychological cost.

At first glance, less harsh measures over the last 16 months would obviously have been better for our collective mental health. Open schools would have meant better educational opportunities and more time for young people to spend with their friends. Fewer restrictions would have meant more time for all of us to spend with loved ones – especially beneficial for vulnerable individuals such as elderly people left isolated in care homes.

Less time locked down at home would have meant more time out in the world, pursuing all the activities that bring people pleasure and meaning. No doubt about it: greater freedom would have prevented a lot of psychological harm.

However, this doesn’t necessarily mean lockdown was a bad idea, or that the sceptics are right. In fact, less-restrictive lockdown measures may have led to just as many mental health problems, and quite possibly more.

If national lockdowns hadn’t been implemented, many more people would have been infected with the virus – which would mean many more people living with the mental health consequences of the disease.

Consider the individuals who are infected with Covid-19 but survive. We know from research into other virus epidemics, such as Ebola, that survivors of the virus usually have a higher rate of mental health problems than other people, both during and after the epidemic. This includes increased rates of depression, anxiety and post-traumatic stress.

There is some evidence that this is also true for Covid, and there are many reasons why this happens. The experience of being hospitalised, especially during a pandemic, can be traumatic. Some survivors experience life-threatening situations, such as being in a medically induced coma. There are also direct consequences of the infection in the brain, such as neuroinflammation, which can trigger or exacerbate mental health problems.

Then there’s long Covid. In the UK alone, an estimated million people have suffered from infection-related symptoms for many weeks or months. Up to a third of all people hospitalised with Covid report subsequent symptoms of depression and anxiety. The “physical” symptoms of long Covid undoubtedly affect mental health too. If a person experiences fatigue, muscle pain and breathing problems over many months, with no idea whether these things will ever go away, it makes sense that they might start to experience mental health problems such as depression as a result.

More infections would also have meant more deaths, and that would lead to more bereavement. For every Covid-19 death, researchers estimate that there are nine bereaved family members and friends. Bereavement increases the risk of mental health problems. Some individuals experience prolonged or complicated grief, in which their distress is particularly severe and chronic. If lockdowns had never been implemented, or lifted early, the inevitable increase in deaths would have led to more individuals being bereaved.

Finally, there are the healthcare workers, particularly doctors and nurses working on Covid wards and intensive care units, who have reported increasing mental health problems in recent months. Many healthcare workers were stressed already. When the pandemic hit, they had to cope not only with shortages of PPE and other materials, but with the fear for their own physical health and the risk of bringing the virus home to their families. This was accompanied by longer working hours, fewer days off and growing physical and mental exhaustion.

It’s true that lockdowns have certainly caused some people’s mental health to deteriorate. While much of the general population remained psychologically resilient during the first wave of infections in 2020, many vulnerable people suffered. There is also concern that things deteriorated with more recent waves and corresponding lockdown restrictions. For example, symptoms of anxiety and depression in elderly people in the US fluctuated between April 2020 and March 2021, but reached their peak during the second wave in December and January, when daily infection rates were highest.

It’s possible that as time wore on, people became more and more demoralised and frustrated, particularly in the winter when there was no end of the pandemic in sight. In the UK, there have been reports of increased demand for mental health services this year. The enormous disruption to people’s lives caused by lockdowns, including the economic impact and social deprivation, are inevitably harmful for at least some people.

But we cannot ignore the psychological impact of the virus itself, on the people who are infected and those who care for and love them. Therefore, in March 2020 and ever since, there has not been a simple choice between infection rates and the population’s mental health. Locking down and not locking down both have serious potential consequences for people’s wellbeing, but national lockdown was most likely the better of two very bad options.

Was there any option that might have kept the infection rates and the mental health consequences low? There was: the elimination or suppression strategy that a handful of countries, such as Australia or South Korea, implemented. The “no Covid” approach allowed early reopenings because cases of infection were so low that the risks were manageable. As a result, these countries have had fewer Covid deaths, more economic growth and enjoyed more civil liberties.

A “no Covid” strategy would have been helpful for mental health too. After a contained period of social restrictions, it would have allowed more social gatherings, open schools and more visits to care homes. It would have meant mental (and physical) health services were open. Fewer infections and deaths would have meant fewer exhausted doctors and nurses, fewer grieving family members and only very few long Covid cases.

We cannot go back in time to change the UK strategy. But as debates about lifting restrictions continue – and when the next pandemic inevitably arrives – we should remember what we learned from this one. Containing an infectious disease has serious consequences for our mental health, but so does letting it spread.