The first hearse arrived on Tuesday at Madrid's ice rink, hastily transformed into a makeshift mortuary as Spanish authorities scrambled to deal with a rising death toll from the coronavirus.

Spain is Europe's second-hardest hit country after Italy, with 2,696 deaths and nearly 40,000 confirmed cases after 6,600 cases and more than 500 deaths were reported overnight, the sharpest daily increase since the start of the crisis.

More:

Approximately 14 percent of infections are among health workers.

Authorities said on Monday facilities could not cope and agreed to transform the Palacio de Hielo mall, home to an Olympic-sized ice rink, into a morgue.

Footage from Reuters TV showed vehicles at the building cordoned off by police officers in masks.

The military disinfected 179 nursing homes on Monday and plan to clean another 96 on Tuesday, officials said.

Members of the Military Emergency Unit leave a residential nursing home for the elderly after carrying out disinfection procedures in Madrid [Susana Vera/Reuters]

The state prosecutor has opened an investigation after Minister of Defence Margarita Robles said the army had found unattended bodies at nursing homes. She did not say what had caused their deaths.

In the southern region of Andalusia, the mayor of a small town pleaded for help after reporting 38 of 42 residents at the local nursing home had tested positive for the virus, along with 60 percent of staff.

"The virus doesn't kill people ... what's killing people is the system," Rafael Aguilera, mayor of Alcala del Valle told a news conference.

"Our seniors need a permanent solution now. We need oxygen, ambulances and hospitals," he said in a video posted on the town's Facebook page. "A person died in our arms because we couldn't get hold of oxygen."

While Madrid long accounted for about half of Spain's coronavirus cases, new data published on Tuesday showed it now had just under a third of the total, in a sign that the epidemic is spreading throughout the country.

Spanish airport operator Aena said it would close most terminals at Madrid and Barcelona's main airports as air traffic plummeted due to travel restrictions imposed to limit the spread of the virus.

Transport Minister Jose Luis Abalos said traffic through Aena's airports had fallen by 82 percent since the state of emergency was enforced on March 14.

Minister of Foreign Affairs Arancha Gonzalez Laya told Cadena Ser Catalan radio station the government was working to return Spaniards who were travelling abroad at the time of the outbreak and who have struggled to fly home.

Approximately 1,200 people were brought back last weekend and the government is in touch with airlines for the return of Spaniards from Honduras, Guatemala, El Salvador, Peru, Indonesia and the Philippines, she said.