The Portuguese government has attributed the country’s low coronavirus caseload to a swift, flexible “worst-case scenario” response and to the early closure of schools and universities on 16 March.

Despite the fact that around 22% of Portugal’s 10.3 million people are aged 65 or over, making them particularly vulnerable to the virus, the country has so far registered just over 20,000 cases and 714 deaths – far fewer than its neighbours.

Spain has recorded more than 195,000 cases and more than 20,000 deaths, Italy 176,000 cases and more than 23,000 deaths, and France 153,000 cases and around 20,000 deaths. Portugal’s coronavirus mortality rate is around 3%, compared with 13% in the UK and Belgium and 10% in Spain.

António Sales, the secretary of state for health in Portugal’s socialist minority government, said the administration had “taken the right measures at the right time” after monitoring the spread of the virus from the end of January.

António Sales, Portugal’s secretary of state for health. Photograph: Luis Filipe Coito

“The Portuguese response to the global coronavirus outbreak has, since the very beginning, been based on the best scientific advice and on other countries’ experience,” he told the Guardian. “It has been regularly reassessed and adapted to a very fast evolution. The country has been preparing for the worst-case scenario.”

Sales said that the decision to close all schools and universities in mid-March – when the country had logged 112 cases and no fatalities – had proved pivotal. “Anticipating the spread of the infection and community transmission, the government decided to close educational institutions in order to limit the contact of a large amount of people in a confined place,” he said.

Six days after the country’s educational establishments were shut, Portugal declared a state of emergency and moved into full lockdown after recording 448 cases. Spain had gone into lockdown on 14 March after logging more than 6,000 cases.

Sales said the government had also moved quickly to increase laboratory and invasive ventilation capacity and to plan for the provision of more intensive care unit beds. He added that Portugal’s rapid reaction had been helped by five years of sustained investment to bring the national health service back to pre-austerity levels.

“Between December 2015 and December 2019, the national health workforce has increased by 13%, which means that more 15,000 healthcare workers, including 3,700 doctors and 6,600 nurses, are working,” he said. “Also, between 2015 and 2019, government expenditure on health has increased by 18% (€1.6bn).”

Many health workers across the border in Spain argue that its response to the pandemic has been hampered by a lack of investment in health services – especially in Madrid, the region hit hardest by the virus.

Inês Fronteira, an assistant professor of epidemiology at the institute of hygiene and tropical medicine at Lisbon’s Nova University, said investment in the health system had paid off, but added that Covid-19’s relatively late arrival in Portugal had bought the country more time to monitor and prepare.

A man is given a face mask at a fruit market in Caldas da Rainha, Portugal. Photograph: Carlos Barroso/EPA

“We detected the first case on 2 March and then local transmission began on 12 March – much later than in France and Spain, or Italy,” she said.

“So Portugal had the opportunity to watch what other countries were going through, to see what measures were being taken, and to learn from those experiences. Portugal ended up implementing more or less the same measures as other countries – and at the same time – but the epidemic here was at a much earlier stage than in other countries.”

Fronteira said Portugal’s centralised health system and cross-party support for the emergency measures had also helped.

In Spain, healthcare is the responsibility of the country’s 17 autonomous regional governments and the response was not brought under the control of the central government until the state of emergency was declared.

Despite a recent poll showing that almost 90% of Spaniards felt that all political parties should support the government’s crisis management, opposition leaders have repeatedly attacked the socialist-led coalition government of Pedro Sánchez.

That has not been the case in Portugal. “Political parties have adopted a responsible behaviour because everybody understood very well the importance of being united to tackle an unexpected pandemic with dramatic consequences,” said Sales.

According to Fronteira, the pandemic underscores the need for proper preparation. “That’s going to be crucial to the next stage of the epidemic as we start discussing whether to loosen the measures or not,” she said.

“It’s important to take one step at a time because you need to have time to measure the impact of each of the measures. For this type of response, you also need to have social and political cohesion to effectively implement public health measures.”

Sales said that while it was to soon to start drawing conclusions, “We are constantly learning with our outbreak and with other countries’ experiences. We will be better prepared for the next time, for sure.”