The Minister of Defense said staff fled after COVID-19 was detected -- and would be prosecuted.
Elderly people are being abandoned to die in Spanish care homes.
Defense Minister Margarita Robles said in a briefing on Monday that the military, which has been drafted to disinfect residential homes, had found dead bodies in their beds, having been left to fend for themselves.
"During some of its visits, the army has seen some totally abandoned elderly people – even some who were dead in their beds," she said.
She added that while the vast majority of centers are fulfilling their duties, those who were not would face serious repercussions.
"We're going to be very blunt and implacable over this and we have a very clear message: the full weight of the law will fall on those who don't meet their obligations," she said.
"We will be completely relentless and forceful with the kind of treatment elderly residents receive in these centers."
After Italy, Spain is the European country hardest hit by the coronavirus outbreak: almost 40,000 cases have been reported, and more than 2,800 deaths.
Two Spanish cabinet ministers have already tested positive, as has the prime minister's wife, Begoña Gómez, while on Monday Vice-President Carmen Calvo was hospitalized with a respiratory infection.
To alleviate the strain on hospitals and funeral homes, health authorities converted a large ice rink in Madrid into a temporary morgue.
"This is a temporary and extraordinary measure primarily intended to mitigate the pain of victims' families and the situation in Madrid's hospitals," officials said.
Got a story or a tip for us? Email TooFab editors at email@example.com.