Kindergartens, schools and universities in the Madrid region will close for two weeks from Wednesday as a precaution against coronavirus, officials said on Monday, as the disease spread further around Spain.
Media including Cadena Ser radio said this would send 1.2 million pupils home, as Spain starts to follow Italy's lead in taking drastic measures to try to delay the spread of the virus.
Twenty-eight people have died in Spain from coronavirus, with cases jumping on Monday to 1,204, one of the highest numbers in Europe, though still far behind Italy's tally.
"It wasn't easy to make this decision but public health must come above everything," the head of the Madrid region, Isabel Diaz Ayuso, told a news conference.
The shutdown includes nurseries and vocational training centres as well as primary and secondary schools and universities. Ayuso advised the elderly and people with chronic illnesses to stay at home.
"These measures imply a disruption to normal activity in these places, but I appeal for your understanding as they are measures that we consider necessary in these areas," Health Minister Salvador Illa told another news conference.
Schools and universities in the Basque capital Vitoria will also close for two weeks, sending tens of thousands of pupils home. This will affect 63,000 students, the Basque newspaper El Correo said.
Some parents expressed concerns, not least about finding childcare.
"I don't know if it will be beneficial or will cause more alarm," Mikel Arrikstain, 38, said as he collected his child from school in Vitoria.
Prime Minister Pedro Sanchez said the government was preparing what he called a "shock therapy" plan to mitigate the impact of the virus on the economy.
Economy Minister Nadia Calvino said the government was considering temporary measures to support the worst-hit industries, such as tourism, but that it expected the economic impact of the virus to be temporary and limited.