The flight with 141 passengers aboard was then canceled, AENA confirmed on its Web site. Passengers were put up in a local hotel.
Spanair told the El Periodico newspaper the stop in Malaga, on Spain's southern coast, was not an emergency landing.
On Wednesday, a Spanair MD-82 bound for the Canary Islands crashed upon takeoff in Madrid, killing 154 people. Authorities still do not know why that airplane crashed, but it had aborted a previous takeoff because of problems with an air temperature gauge.
After the gauge was turned off - a procedure Spanair says was allowed because the gauge was not a critical element - the plane crashed on its second takeoff attempt.
The death toll from Wednesday's crash rose late Saturday when a 31-year-old woman succumbed to her injuries. Eighteen others survived, including three children.
Religious services across the country paid tribute to the victims of Spain's worst air disaster in a quarter century. At Madrid's imposing Almudena Cathedral, prayers were said at Sunday Mass for both survivors and victims, and mourning relatives were joined by hundreds of others touched by their tragedy.
All 18 survivors remained hospitalized four days after the crash. Officials said one of them - a 44-year-old woman with possible brain damage and other injuries - was in very critical condition Sunday. She is the mother of an eight-year-old boy who survived with a broken leg.
Two other survivors, a 57-year-old man with severe head injuries and a 54-year-old woman with thorax and bone injuries, remain critical in intensive care, officials said.
Other injured passengers are showing signs of recovery, according to Aurora Fernandez, the La Paz hospital director. The co-director of the hospital, Antonio Burgueno, said one survivor could be released soon, a 42-year-old woman with leg injuries.
So far around 55 of those who died Wednesday aboard the Spanair MD-82 bound for the Canary Islands have been identified, with authorities awaiting results of further DNA tests on the rest.
One of the issues delaying identification was that the DNA of some victims was not in good condition, Interior Minister Afredo Perez Rubalcaba said Sunday.
"We have to be certain that what we tell the families is the truth," Rubalcaba said, assuring relatives that forensic investigators were working "as hard as they can."
Late Saturday, airline officials met with relatives at a hotel near the airport in a bid to relieve tensions about the slow flow of information on why the airliner might have crashed.
Spanair deputy director Javier Mendoza showed relatives a slide show of how a probe at the front of the plane - whose malfunction caused the captain of flight JK5022 to turn back from an initial takeoff - was dealt with.