The gap between regional and national decision-making also encouraged many wealthy Madrid residents to hurry to their seaside homes, once all Madrid schools had been shut, at the risk of further spreading a virus that was already firmly embedded in Spain’s capital.

“A new and fragmented government starts with a huge disadvantage in this kind of crisis situation, because it requires quick and forceful decisions to be taken without constantly worrying about whether somebody else is gaining a political advantage,” said Toni Roldán, a Spanish economist and former lawmaker from the Ciudadanos party.

As a measure of the difficulties, Quim Torra, the separatist leader in northeastern Catalonia, refused even to sign a joint declaration with Madrid on coordinating the lockdown with the national government.

Fernando Rodríguez Artalejo, an epidemiologist and university professor, said Spain should not be judged harshly over its response to a pandemic that every government had passively watched unfold in a neighboring country “as if watching a movie.”

Spain watched Italy, he acknowledged, but with the mitigating factor that many scientists believed until recently that asymptomatic people were probably not contagious.

“The idea was that the authorities just needed to track the cases and identify the people whom they had been in contact with,” he said. “This doctrine is now gone, but too late for Spain.”

Even so, Spain’s main neighbor has fared much better so far. Despite sharing a 750-mile border with Spain, Portugal passed 200 coronavirus deaths last week just as Spain reached 10,000.