Grieving parents buried their children Sunday after a devastating daycare fire killed 40 infants and toddlers, stunning Mexico and prompting its president to promise a thorough investigation.

Funeral processions drove slowly to churches in the northwestern city of Hermosillo decorated with balloons and flowers.

The family of 2-year-old Maria Magdalena Millan dropped white roses on her casket and attached a Dora the Explorer balloon to the cross marking her grave at one of the first funerals held on Saturday.

"I love you and I don't want to leave you here!" her mother screamed.

President Felipe Calderon arrived in the city late Saturday. He wished surviving children a speedy recovery and promised families full government support and a thorough investigation into the fire's cause.

"I want to say to the mothers and fathers of the little ones who died that we share their profound sadness," Calderon said earlier in the day.

The death toll rose to 40 on Sunday after two children died in hospitals, according to Sonora state health secretary Raymundo Lopez Vucovich. Most of the victims had died of organ collapse caused by smoke inhalation, he said.

The fire initially spread from an adjoining tire and car warehouse to the roof of the ABC day care and sent flames raining down. Fire officials still don't know how it started.

Delfina Ruelas, 60, said her grandchild German Leon died of his burns on Saturday, three days after his fourth birthday.

She and her husband saw televised reports about the fire Friday and rushed over.

"I thought he wasn't that burned and that we would find him OK, but he was very burned," said Ruelas, dissolving into tears outside the morgue, where she waited with 30 other relatives. "They operated on him yesterday, and he held on, but today he couldn't."

Firefighters carried injured children out the day care's front door — its only working exit — and through large holes that a civilian knocked into the walls before rescue crews arrived, according to a fire department official who spoke on condition of anonymity because he was not authorized to speak publicly about the fire.

Noe Velasquez, who works at a nearby auto parts store and helped rescue five toddlers, said one of the children's fathers had rammed his pickup truck through a wall. Velasquez did not know if the man's child survived.

The deaths in Hermosillo, capital of the state of Sonora with a population of about 560,000, again raised questions about building safety in Mexico. Officials cracked down on code violations last year after a deadly stampede at a nightclub killed 12 and a disco fire nine years ago killed 21. Both clubs were in Mexico City.

An estimated 142 children, ranging from 6 months to 5 years in age, were in the day care at the time of the fire, along with six staffers who looked after them, Sonora state Gov. Eduardo Bours told a news conference.

That ratio is in line with legal standards, said Daniel Karam, director of Mexico's Social Security Institute, which outsourced services to the privately run center.

A May 26 inspection found that the building — a converted warehouse with a few windows high up — complied with safety standards, Karam added. He conceded that security requirements might need reevaluation.

Guadalupe Arvizu, who was visiting her injured 2-year-old grandson at a hospital, said the building's emergency exit could not be opened on Friday. She did not know why.

"The place is in bad condition. It's a warehouse. There are no windows in the classrooms," said Arvizu, whose daughter — the boy's mother — is a caretaker at the center but was not injured in the blaze.

Some of the children had third-degree burns, according to the Hermosillo fire department official. Thirty-three remain hospitalized, 23 of them in Hermosillo, including 13 who are in critical condition, Lopez said. One of them is brain dead.

Nine were transferred to Mexican hospitals in Ciudad Obregon in Sonora and the western Mexican city of Guadalajara, which has a special burn unit, he said.

Four children were released, along with two of six adults who had been admitted, Lopez said. The adults included five women who looked after children at the center and a security guard.

Two 3-year-olds were being treated at a pediatric burn center in northern California. One of them, a girl, was flown there with her father by a Mexican military transport, a great-uncle said. She had burns over 80 percent of her body and was expected to require months of care.

Dr. Tina Palmieri, assistant chief of burns at Shriners Hospital for Children Northern California, said the survival rate in such cases is about 50 percent.

"A lot of it is how deep the burn is and where it's located and how bad is the smoke inhalation," she said.

Carlos Gonzalez Gutierrez, Mexico's consul general in Sacramento, said more victims may be headed there for treatment.

Pope Benedict XVI sent a telegram of sympathy for those killed or injured, the Vatican said Sunday. The pontiff was "deeply pained" by the fire and offered his prayers for its victims as well as "heartfelt condolences" to their loved ones, the telegram said.